sorry, i missed a bit, change this:
Code:
# after the last }
echo '</div>';
also, foreach is a constructor built for arrays, $sql is the array representor, $key is the dynamic variable that represents the name of the key in each iteration of the array, and $current will contain the current value (SQL code) as it iterates through the array.
this appears to be an SQL error, try modifying the following:
Code:
$do = mysql_query($current);
# change to
$do = mysql_query($current) or die(mysql_error());
and report if there is an error and if so, what is it?