note 74998 deleted from control-structures.foreach by tularis

From: Date: Tue, 08 May 2007 08:54:07 +0000
Subject: note 74998 deleted from control-structures.foreach by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-126318@lists.php.net to get a copy of this message
Note Submitter: alien at bside dot sk ---- $my_array = array(0, 1, 2, 3, 4); $number = &$my_array[1]; foreach ($my_array as $i => $number) { echo $i . '=' . $number . '<br />'; } Output: 0=0 1=0 2=2 3=3 4=4 This is giving funny result. Any ideas?

« previous php.notes (#126318) next »