Having a little trouble, trying to create a table with a row every 5 colums, dosnt seem to be working, and im not sure what ive done wrong -
echo '<br>';
echo '<table border="1" cellspacing="3" cellpadding="3" align="center" bordercolor="#E8EAE8">';
echo '<tr>';
$SQL = "SELECT * from LISTINGS WHERE CATAGORY='$cata'";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
$address = $row["ADDRESS"];
$price = $row["PRICE"];
$mainphoto = $row["MAINPHOTO"];
$ide = $row["ID"];
echo "<td>$mainphoto</td>";
$x = count ($price);
if ($x == "5") {echo "<tr>";}
if ($x == '10') {echo "<tr>";}
if ($x == '15') {echo "<tr>";}
if ($x == '20') {echo "<tr>";}
}
I think im missing somthing simple, thanks for any help