note 97175 deleted from function.array-key-exists by danbrown
| From: | danbrown@php.net | Date: | Tue, 06 Apr 2010 18:45:48 +0000 |
| Subject: | note 97175 deleted from function.array-key-exists by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-167737@lists.php.net to get a copy of this message | ||
Note Submitter: contacto at hardcode dot com dot ar
----
I had to find a string in a multi dimensional array, but just needed to know if that string was
inside the array, don't know if there's a func for that.
the simplest way i could find to do this was:
if(strpos(print_r($multi_dimensional_array, 1), "text im looking for"))===false) {
echo "not in array";
} else {
echo "yeah!";
}
:)