note 97175 added to function.array-key-exists

From: Date: Tue, 06 Apr 2010 18:25:54 +0000
Subject: note 97175 added to function.array-key-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-167736@lists.php.net to get a copy of this message
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!"; } :) ---- Server IP: 201.216.232.3 Probable Submitter: 190.55.170.233 ---- Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php Edit -- https://master.php.net/note/edit/97175 Del: integrated -- https://master.php.net/note/delete/97175/integrated Del: useless -- https://master.php.net/note/delete/97175/useless Del: bad code -- https://master.php.net/note/delete/97175/bad+code Del: spam -- https://master.php.net/note/delete/97175/spam Del: non-english -- https://master.php.net/note/delete/97175/non-english Del: in docs -- https://master.php.net/note/delete/97175/in+docs Del: other reasons-- https://master.php.net/note/delete/97175 Reject -- https://master.php.net/note/reject/97175 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167736) next »