I have an array as follows
array(2) { [\"operator\"] => array(2) { [\"qty\"] => int(2) [\"id\"] => int(251) } [\"accessory209\"] =>
$map = array(); foreach ($arr as $v) { $map[$v['id']] = 1; } //then you can just do this as when needed $exists = isset($map[211]);
Or if you need the data associated with it
$map = array(); foreach ($arr as $k => $v) { $map[$v['id']][$k] = $v; } print_r($map[211]);