ID: 14068
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.0.5
New Comment:

Non-Bugs are bogus.

Previous Comments:
------------------------------------------------------------------------

[2001-11-15 07:29:54] [EMAIL PROTECTED]

Andrey Hristov:

Try
reset($a); before the first while, and reset($b) just before the second in 
the body if the first.

------------------------------------------------------------------------

[2001-11-15 07:29:44] [EMAIL PROTECTED]

you have to reset() the arrays before
the loops start to reset the internal
array pointer (see http://php.net/each)

or better use the foreach loop instead
of while/each

------------------------------------------------------------------------

[2001-11-15 06:56:24] [EMAIL PROTECTED]

<?php

$a[0]="x";
$a[1]="y";
$b[0]="z";
$b[1]="w";
$b[2]="u";

while (list($key,$val)=each($a) )
        {
                while (list($key2,$val2)=each($b) )
                        {
                                print "$key: $val - $key2: $val2<br>";
                        }
        }
?>

'./configure' '--with-mysql' '--with-apache=../apache_1.3.20' '--with-gd=../gd-1.8.3' 
'--enable-track-vars'

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14068&edit=1


-- 
PHP Development 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