That does not seem to work. So i thought if i pasted you my code you might be able to help me out a little bit more. I've been pulling my hair out over this for the past couple of days.
Thank you for your help
As you can see i have commented out some other thigns i have tried as well.
Thank you again - Anthony
$sql = "SELECT * FROM users WHERE user='$name'";
$result = mysql_query($sql,$con);
$row = mysql_fetch_array($result) or die(mysql_error());
$mainpic = $row['mainpic'];
$pic1 = $row['pic1'];
$pic2 = $row['pic2'];
$pic3 = $row['pic3'];
$pic4 = $row['pic4'];
$pics = array($pic1,$pic2,$pic3,$pic4);
//foreach ($pics as $key => $value)
//{
//if ($value == "default.gif") { unset ($pics[$key]); }
//}
var_dump($pics);
foreach($pics as $picname)
{
if ($picname != 'default.gif') {
$table .= "
<td align=center><a href=http://c.com/viewimage.php?image=$picname&name=$name> <span style='text-decoration: none'><img
src=http://lc.com/pics/$picname height=80 width=80></a></span></td>
";
}
}
echo $table;
?>