Possible Duplicate:
how to skip elements in foreach loop
I have the following foreach:
foreach($documents as $document):
print_r($document);
endforeach;
Which outputs the following:
Array
(
[num] => 2
)
Array
(
[0] => Array
(
[name] => Batman
[url] => http://batman.com
)
[1] => Array
(
[name] => Superman
[url] => http://superman.com
)
)
The first array conatining [num] => 2, I dont want to use in my foreach when printing the result.
But how do I get rid of that array so it doesn't get printed when I use write print_r($document)?