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

  $ 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');   

What is it currently doing to make this work

    

The text "itemprop =" text ">

Here is an example from the bodal:

  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

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -