Given your resulting structure, I would do a foreach
on the data to break it into single set of array with all the ids returned from the table.
From there I would foreach
the $_REQUEST['invite_user_id']
against the new array $ids
, here is a sample:
$ids = array();
foreach ($response as $item)
{
$ids[] = $item['invite_user_id'];
}
foreach ($_REQUEST['invite_user_id'] as $id)
{
if (!in_array($id, $ids))
{
echo "{$id} was not found...\n";
}
else
{
echo "{$id} was found...\n";
}
}