2

我在代码中有检索所有段列表的过程。

$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] => 
                )
    ...

我如何过滤这些数据以获取个人资料?谢谢!

4

0 回答 0