Hi there,
I want to check if a check if a certain value is in array with a row from my database, I think it is something like this but this code doesn’t give the right result, the value is never in array:
$sql = mysql_query("SELECT Row FROM table WHERE Type='Type'");
while ($row = mysql_fetch_array($sql)) {
$array = array("'".$row['Row']."', ");
}
if (in_array("Value", $array, true)) {
// positive
}
else
{
// negative
}
Hope you guys know what’s wrong about it.
Thanks