note 121959 deleted from function.array-search by cmb
| From: | cmb@php.net | Date: | Fri, 01 Dec 2017 14:15:23 +0000 |
| Subject: | note 121959 deleted from function.array-search by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-209290@lists.php.net to get a copy of this message | ||
Note Submitter: z dot chaitanya at gmail dot com
----
array_search in if condition
if(gettype(array_search($var, $array)) != 'boolean')
{
//$var exists in $array
}
else
{
//$var does not exist in $array
}