From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.1.2
PHP Bug Type:     Arrays related
Bug description:  nested while(list = each) break, weird workaround

nested while(list=each) produces weird results.
this code

<?php
       $outsidearray = array("key1","key2");
       $insidearray = array("0","1");

           while(list(,$outerval) = each($outsidearray)){
               //$placeholder = $insidearray;
               while(list(,$innerval) = each($insidearray)){
                       print "inloop $innerval for $outerval<br>";
               }
       }
?>

only gets to key1 of the outer loop.
But if you uncomment the $placeholder line,
it works ok.
-- 
Edit bug report at http://bugs.php.net/?id=16227&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16227&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16227&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16227&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16227&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16227&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16227&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16227&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16227&r=submittedtwice

Reply via email to