I have an array like the following in PHP:
$my_array = array(); $my_array[] = array(\"id\"=>\"myid1\", \"name\"=>\"myname1\"); $my_array[] = array(\"id\"=&
you can get your array column name by array_column method.Then find you want string by array_search its will return the index of array.
name
array_column
array_search
$index = array_search("othername",array_column($my_array,"name")); var_dump($my_array[$index]["id"]);