note 52430 deleted from function.list by nlopess

From: Date: Sun, 01 May 2005 08:33:12 +0000
Subject: note 52430 deleted from function.list by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-88828@lists.php.net to get a copy of this message
Note Submitter: ceo at l-i-e dot com ---- I dunno what the documentation is trying to say when it says "list only works with numerical indices" but it's patently false: php -a <?php $foo = array('a'=>'apple', 'b'=>'banana', 'c'=>'coconut'); while (list($k, $v) = each($foo)){ echo "$k: $v\n"; } ?> Content-type: text/html X-Powered-By: PHP/4.3.11 a: apple b: banana c: coconut It has worked just fine with alpha indices since PHP 3.0rc2, at a minimum, cuz I've been doing it that long.

« previous php.notes (#88828) next »