我在代码中有检索所有段列表的过程。
$SegmentArray = $service->management_segments->listManagementSegments();
我需要检索特定细分的细分。
如果我使用此输出:
echo "results:<br><pre>".print_r($SegmentArray,true)."</pre>";
列表(JSON)是:
Array
(
[kind] => analytics#segments
[username] => nomeaccount@gmail.com
[totalResults] => 13
[startIndex] => 1
[itemsPerPage] => 1000
[items] => Array
(
[0] => Array
(
[id] => -1
[kind] => analytics#segment
[selfLink] => https://www.googleapis.com/analytics/v3/management/segments/gaid::-1
[segmentId] => gaid::-1
[name] => All Visits
[definition] =>
)
...
如何为个人资料过滤此数据? 感谢的!