note 52192 deleted from function.key by bjori

From: Date: Tue, 18 Apr 2006 07:48:53 +0000
Subject: note 52192 deleted from function.key by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108382@lists.php.net to get a copy of this message
Note Submitter: fiskah ---- In order to check if there is a value in an array where key is something special, use this "key in array" function: <?php function key_in_array($needle, $haystack) { $haystack = array_flip($haystack); if (in_array($needle, $haystack)) { return true; } else { return false; } } ?>

« previous php.notes (#108382) next »