I have a multidimensional array like this
$queryRequest = array(
"Pub" => array(
"4bf58dd8d48988d11b941735",
"52e81612bcbc57f1066b7a06",
"4bf58dd8d48988d155941735"
),
"Gym" => array(
"4bf58dd8d48988d175941735"
)
);
I need to create a function that does a look up on an id -- and I need it to return the parent key.
So I have 4bf58dd8d48988d155941735 -- I need it to return Pub
$key = array_search($catId, $haystack);
didn't work