unset key/element in array
| From: | Aljosa Mohorovic | Date: | Sat, 15 Jun 2002 06:10:14 +0000 |
| Subject: | unset key/element in array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-102304@lists.php.net to get a copy of this message | ||
i need to remove elements in array which are empty.
this code works but is it ok to do it like this?
code:
if(in_array("", $people)) unset($people[array_search("", $people)])