On Tue, 2004-02-17 at 15:22, Jochem Maas wrote:
> $applePie = array(1,2,3,4,5,6,7,8);
> 
> while ($pieceOfPie = array_shift($applePie)) {
>       echo $pieceOfPie; // want some pie?
> }

Careful, that will eat your array as well.  When the while loop finishes
you won't have any pieces of pie left!

IE:
$applePie = array(1,2,3,4,5,6,7,8);

while ($pieceOfPie = array_shift($applePie)) {
        echo $pieceOfPie; // want some pie?
}

// Both of these are now true:
$applePie == array();
$applePie != array(1,2,3,4,5,6,7,8);

-Adam

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to