Hello Tim,

Thursday, April 12, 2001, 1:43:53 PM, you wrote:

TW> you can't nest foreach as you should be able to. Ecah foreach is supposed to
TW> have it's own pointer in the array, but it doesn't ... this is a known bug.

What do you mean? Foreach() can be nested, and it works perfect.

<?php
$a = array (array (1, 2, 3), array(4,5,6), array(7,8,9));
foreach ($a as $k => $first) {
  print "$k:\n";
  foreach ($first as $second) {
        print "\t$second\n";
  }
}
?>

output:
0:
        1
        2
        3
1:
        4
        5
        6
2:
        7
        8
        9




-- 
Best regards,
Maxim Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to