note 30404 deleted from function.current by bjori
| From: | bjori@php.net | Date: | Mon, 24 Apr 2006 15:14:33 +0000 |
| Subject: | note 30404 deleted from function.current by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-109457@lists.php.net to get a copy of this message | ||
Note Submitter: kyle
----
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)