This question already has an answer here:
I can't understand how to get numeric index of "Index1" in such a structure:
$arr = array('Index','Index1' => array("one","two","three"),'Index2');
i'm trying to use array_search like so:
$index = array_search("Index1",$arr);
but it doesn't work; Thanks
Index1
doesn't have a numeric index (see for yourself) – kingkero Sep 18 '14 at 13:40Index1
. There's no "numeric index" for a string index. – deceze Sep 18 '14 at 13:41array(0 => 'Index', 'Index1' => .., 1 => 'Index2')
and produce the exact same structure – kingkero Sep 18 '14 at 13:42