Use the in_array() function to search for values in an array:
$array1=("1","2");
$array2=("2","3","4");
for ($t=0;$t<count($array1);$t++)
{
if (in_array($array[$t],$array2)
{
print "Found one\n";
};
};
Instead of the for loop, you can also use the array_walk function.
Manuals manuals manuals...