I want to get the index of an array without foreach. this is sample array
Array
(
[0] => Array
(
[gcr_distance] => 31.0
[gcr_id] => 23
)
[1] => Array
(
[gcr_distance] => 28.0
[gcr_id] => 22
)
[2] => Array
(
[gcr_distance] => 26.0
[gcr_id] => 20
)
[3] => Array
(
[gcr_distance] => 110.0
[gcr_id] => 21
)
)
suppose if my data is gcr_id=21, by comparing with the above array it should give me an index of array 3