note 23490 deleted from function.in-array by felipe

From: Date: Sun, 30 Dec 2007 18:47:53 +0000
Subject: note 23490 deleted from function.in-array by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134464@lists.php.net to get a copy of this message
Note Submitter: nicolaszujev at hot dot ee ---- I wrote this function to check key in array and also check value if it exists... function in_array_key($key, $array, $value = false) { while(list($k, $v) = each($array)) { if($key == $k) { if($value && $value == $v) return true; elseif($value && $value != $v) return false; else return true; } } return false; } .. very helpful function ...

« previous php.notes (#134464) next »