Php解析特定行

时间:2012-05-23 04:34:50

标签: php facebook parsing

 Array
(
[data] => Array
    (
        [0] => Array
            (
                [name] => Sujay John
                [id] => 765972231
            )

        [1] => Array
            (
                [name] => Bhawesh Kumar
                [id] => 820284831
            )

        [2] => Array
            (
                [name] => Deepak Sharma
                [id] => 1054741730
            )

        [3] => Array
            (
                [name] => Raman Steta
                [id] => 1093844232
            )

        [4] => Array
            (
                [name] => Rohit Sharma
                [id] => 1101853912
            )

        [5] => Array
            (
                [name] => Rakesh Sharma
                [id] => 1128223845
            )

我希望输出如下:

name= Sujay John
id= 765972231

[name] => Deepak Sharma
[id] => 1054741730

就像那样....只有用户的名字和身份。

1 个答案:

答案 0 :(得分:0)

foreach($level01['data'] as $dataArray){
   echo 'name='.$dataArray['name'].' id='.$dataArray['id'].;
}

希望有帮助或者我的问题出错...