Jump to content

Searching a Multidimensional Array


Dan_Mason

Recommended Posts

I am having trouble searching for an item in a multi-dimensional array.

 

Is there a way to search only one column in a multi-dimensional array?

 

i.e:

 

MULTI-DIMENSIONAL ARRAY

ID  Name  DataTable

0  John  Employee

1  Dan  Employee

2  Matt  Boss

3  Becky Supervisor

 

Is there a way to only search the column "Name"(Column 2) using array_search() or similar? (i.e array_search("John",$ARRAY[Column2])

 

The help would be very much appreciated!

 

Cheers, Dan  :)

Link to comment
https://forums.phpfreaks.com/topic/232847-searching-a-multidimensional-array/
Share on other sites

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.