note 93605 added to function.array-key-exists

From: Date: Thu, 17 Sep 2009 22:52:48 +0000
Subject: note 93605 added to function.array-key-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-160813@lists.php.net to get a copy of this message
Here's a simplified but equivalent version of the recursive search by Benjamin*removethis*BeckATgmx.de: <?php function array_key_exists_r($needle, $haystack){ if (array_key_exists($needle, $haystack) return true; foreach ($haystack as $v) { if (is_array($v) && array_key_exists_r($needle, $v)) return true; } return false; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 71.165.91.32 ---- Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php Edit -- https://master.php.net/note/edit/93605 Del: integrated -- https://master.php.net/note/delete/93605/integrated Del: useless -- https://master.php.net/note/delete/93605/useless Del: bad code -- https://master.php.net/note/delete/93605/bad+code Del: spam -- https://master.php.net/note/delete/93605/spam Del: non-english -- https://master.php.net/note/delete/93605/non-english Del: in docs -- https://master.php.net/note/delete/93605/in+docs Del: other reasons-- https://master.php.net/note/delete/93605 Reject -- https://master.php.net/note/reject/93605 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160813) next »