note 66760 deleted from function.current by bjori
| From: | bjori@php.net | Date: | Sun, 28 May 2006 10:58:36 +0000 |
| Subject: | note 66760 deleted from function.current by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-112434@lists.php.net to get a copy of this message | ||
Note Submitter: dave at psntn dot com
Reason: bad code
----
May be worth noting that if the array you are using with current() is a reference, you will need to
pass a reference to current() as well.
For example:
<?php
$test_array = array('a', 'b', 'c');
$loop_array =& $test_array;
while ($current = current(&$loop_array))
{
// Do stuff
}
?>