note 30404 added to function.current
| From: | kyle at rack1 dot php dot net | Date: | Mon, 17 Mar 2003 09:49:11 +0000 |
| Subject: | note 30404 added to function.current | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45409@lists.php.net to get a copy of this message | ||
The comment by 'someone out there' is wrong according to the warning. If I read the
warning right, if there are elements with empty values, it will die.
look at array_keys, it does what is described there, and probably faster too. Then loop through
that (since all numeric indices, simple for loop should work:
$keys=array_keys($myarr);
for($x=0;$x<count($keys);$x++) {
...
}
though foreach is probably recommended)
--
http://www.php.net/manual/en/function.current.php
http://master.php.net/manage/user-notes.php?action=edit+30404
http://master.php.net/manage/user-notes.php?action=delete+30404
http://master.php.net/manage/user-notes.php?action=reject+30404