The array looks something like this:
$array = array(
array(
'Item' => array(47, 48, 46, 42),
'ID' => 1,
),
array(
'Item' => array(29, 37, 46, 48),
'ID' => 2,
),
array(
'Item' => array(33, 27, 18),
'ID' => 3,
),
);
What I am trying to do is to search through the [Item] arrays and if there is a match, add the [ID] to a new array.
So, if I was looking for 46 then I would get the results back of ID’s 1 and 2 in a simple array.
I’m sure this should be so simple, but I seem to have hit a complete mental block so any help would be much appreciated.
Try: