note 34398 modified in function.array-key-exists by didou
| From: | didou@php.net | Date: | Wed, 30 Jul 2003 03:25:33 +0000 |
| Subject: | note 34398 modified in function.array-key-exists by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52983@lists.php.net to get a copy of this message | ||
For versions before 4.1.0:
function arrayKeyExists($key, $search) {
return in_array($key, array_keys($search));
}
--was--
Better style: (I hate sloppy code)
function arrayKeyExists($key, $search) {
return in_array($key, array_keys($search))
}
http://www.php.net/manual/en/function.array-key-exists.php