Click to See Complete Forum and Search --> : searching array keys?


kydo76
12-20-2003, 03:39 PM
i was wondering if there's any kind of function included in php or anywhere out there that is like in_array() but searches the keys of an array instead of the values

i was thinking of using array_flip() but then using in_array to search but then i dun think that after searching the pointer stays at the found value

any help? please? hehe

YoN
12-20-2003, 05:09 PM
Yes, it is array-key-exists() (http://www.php.net/manual/en/function.array-key-exists.php) ;)

kydo76
12-20-2003, 05:59 PM
wow... that was quick.. thank you.. : )

YoN
12-20-2003, 06:28 PM
You're welcome :)