ok i will explain exactly what im trying to do , i will have a go anyways
i have a while loop then a foreach in side of it checking to see if the $id variable is in the array expel3
but its not working , anyone know why ?
while ($i < $rows) {
$name=mysql_result($result,$i,"name");
$subject=mysql_result($result,$i,"subject");
$type=mysql_result($result,$i,"type");
$id=mysql_result($result,$i,"id");
$sql="SELECT distinct username FROM online where roomid='$id'";
$ucount = mysql_query($sql);
$ucounted=mysql_numrows($ucount);
foreach ($expel3 as $eid) {
if ($eid == "$id"){
echo "something different";
$i++;
}
else {
echo "
<tr><td><img src='images/home.gif'> <a href=\"start.php?id=$id\">$name</a></td> <td> $subject</td> <td> $type</td> <td>$ucounted</td></tr>
";
$i++;
}
}
}