Jump to content

How to search value in multidimension array


suresh_kamrushi

Recommended Posts

Suppose i have a multidimensional array like:

 

$a = array(array('p', 'h'), array('p', 'r'), 'o');

 

And i want to search value 'p' from this. Is there any inbuilt function for this in php? I just dont want to write code for this.

 

in_array and array_search do not search in multidimention array. So please help me out this.

 

 

Thanks in Advance!!!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.