How to search an array key by matching a string in it's value

Nekses

New Member
I'm trying to find the key number in a array matching a string.I tried array_search in this way\[code\]$key = array_search("foo", $array);echo $array[$key];\[/code\]but that prints $array[0]Is there another way to do this?Thanks :)
 
Back
Top