带有PHP的SharePoint API,如何仅获取两列?

时间:2019-01-19 10:46:52

标签: php sharepoint sharepoint-online

我使用来自github的API通过PHP与SharePoint集成。

http://github.com/thybag/PHP-SharePoint-Lists-API

此api很棒! 但是我有一个问题:

$php_data = $sp->read('list_name');
var_dump($php_data);

结果是:

array(3) { 
[0]=> array(5) { ["grey"]=> string(3) "aaa" ["black"]=> string(3) "bbb" ["blue"]=> string(3) "ccc" ["green"]=> string(3) "ddd" ["yellow"]=> string(3) "eee" ["brown"]=> string(3) "fff" }
[1]=> array(5) { ["grey"]=> string(3) "ggg" ["black"]=> string(3) "hhh" ["blue"]=> string(3) "iii" ["green"]=> string(3) "jjj" ["yellow"]=> string(3) "kkk" ["brown"]=> string(3) "lll" }
[2]=> array(5) { ["grey"]=> string(3) "mmm" ["black"]=> string(3) "nnn" ["blue"]=> string(3) "ooo" ["green"]=> string(3) "ppp" ["yellow"]=> string(3) "qqq" ["brown"]=> string(3) "rrr" } 
}

我不知道如何建立我的要求:

array(3) { 
[0]=> array(2) { ["grey"]=> string(3) "aaa" ["blue"]=> string(3) "ccc" }
[1]=> array(5) { ["grey"]=> string(3) "ggg" ["blue"]=> string(3) "iii" }
[2]=> array(5) { ["grey"]=> string(3) "mmm" ["blue"]=> string(3) "ooo" } 
}

我正在阻止...在此先感谢您的帮助

0 个答案:

没有答案