Hi Nikhil,
I couldn't get your problem.Try to explain cleaner next time.
If you are creating an array with the values retrieved from the database and want to check some value with all values in that array then use this
// assuming $res_arr is the array you created and $check_val is the value you want to compare
// declare some Flag
$match="no";
for($i=0;$i<sizeof($res_arr);$i++)
{
if($res_arr[$i]==$check_val)
{
$match="yes";
}
}
// Now check the value of Flag to know whether the checking value is there or not i.e if the value of $match is "yes" or "no"
If you want to check each value got from database with the values in some array then
// declare Flag
$match="no";
In the while loop (in getting values from database)
// assuming the value you get from database is $check_val and Array is $vals_arr
for($i=0;$i<sizeof($vals_arr);$i++)
{
if($check_val==$vals_arr[$i])
{
$match="yes";
}
}
// after the while loop check whether match is found or not