var_dump($ib); gives me the following output:
array (
'data' => array (
0 => array (
'id' => '2015469353355_151',
'from' => array (
'name' => 'Aah',
'id' => '100000292544713',
),
'message' => 'zzzz',
'created_time' => '2012-06-08T06:16:41+0000',
),
1 => array (
'id' => '2015469353355_152',
'from' => array (
'name' => 'assaaaa',
'id' => '100000292544713',
),
'message' => 'zzzz',
'created_time' => '2012-06-08T06:16:51+0000',
),
),
'paging' => array (
'previous' => 'https://graph.facebook.com/2015469353355/comments?limit=25&value=1&redirect=1&__paging_token=2015469353355_175&access_token=AAAFfJS6rRAABAHKGZCy57ZCrSEdQL2kUIYqZAcNBLkbnKTBxRhhx9CTvnUlq2LcAK1kZBWnV6AH5RpvkmGYRFzvk12kNXLe6OhjjapH5PEIUwv1h2tYl&since=1340009948&__previous=1',
'next' => 'https://graph.facebook.com/2015469353355/comments?limit=25&value=1&redirect=1&access_token=AAAFfJS6rRAABAHKGZCy57ZCrSEdQL2kUIYqZAcNBLkbnKTBxRhhx9CTvnUlq2LcAK1kZBWnV6AH5RpvkmGYRFzvk12kNXLe6OhjjapH5PEIUwv1h2tYl&until=1340009948&__paging_token=2015469353355_175',
),
)
How do I retrieve the value of ‘next’ ?
Since
pagingis an index of your main array, and it, in itself is also an array. You can use its indexes to drill down and get to the information you need.$ib['paging']will give you –Then the next step is to drill down into the array your got back one more time to the
nextindex. so what you end up with is a statement that specifies an index within an index.If the
nextparameter was also an array, you could even go further down and use another index –