note 36084 deleted from function.array-search by didou
| From: | didou@php.net | Date: | Tue, 16 Dec 2003 09:36:23 +0000 |
| Subject: | note 36084 deleted from function.array-search by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62035@lists.php.net to get a copy of this message | ||
Note Submitter: mediat dot ro
----
the simplest way to check for returned value (if it's null or 0) is to compare the result with
the searched value, ex:
$place = array_search($id_log, $log_array);
if($log_array[$place] == $id_log)
unset($log_array[$place]);
this will delete the searched value even if it's 0