note 83927 deleted from function.array-unique by levim
| From: | levim@php.net | Date: | Sun, 20 Dec 2015 05:19:09 +0000 |
| Subject: | note 83927 deleted from function.array-unique by levim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-204494@lists.php.net to get a copy of this message | ||
Note Submitter: ali at zkurd dot org
----
a lot of people create functions just to fix a notice error about an undefined index and removes
blank array value.
why not using foreach instead of the for loop?
example:
<?php
foreach ($arrayname as $key => $value) {
//do what you want with $value withaout index stress
}
?>