php - Search an array for the specific value and return its key -
I have a multi-dimensional array that I want to search and return its related key so that I can use the key again Returns more information from that related array.
This looks my array What is it currently doing to make this work The text "itemprop =" text "> Here is an example from the bodal:
$ add_admin_menu_page = array (); $ Add_admin_menu_page [] = array ('dashboard', 'dashboard.fp', 'dashboard'); $ Add_admin_menu_page [] = array ('post', 'post.ppp', 'post'); $ Add_admin_menu_page [] = array ('comments', 'comments.php', 'comments'); $ Add_admin_menu_page [] = array ('tools', 'tools.php', 'tools');
function recursive_re_search ($ needle, $ hansstack) {foreach ($ haystack $ key = & gt; $ value) {$ current_key = $ key; if ($ needle === $ value or (is_array ($ value) & amp; amp; amp; & amp; recursive_array_search ($ needle, $ value )! == Incorrect)) Return $ $ current_key;}} The description is false;}
Comments
Post a Comment