N Nekses New Member Jun 11, 2012 #1 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
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