Hi,
I have an array with sub arrays, example:
$an_array =
array([0] => ([id] => 152 [otherstuff] => blah... )
([1] => ([id] => 167 [otherstuff] => yadda... )
([2] => ([id] => 17 [otherstuff] => stuff... );
I have a variable that stores an id, how can I get the key of the specific array, ie:
$x = 0;
$var = 152;
if($an_array['id'] == $var){
$x = get_this_array_key;
}
I don't know how to get the key of the array where I have the 'id' value of that array
Can anyone help please,
Thanks