I am pulling variables out of mySQL to complete the path to display pictures.
My problem is that I can not get rows and columns; I can only get my pictures to display in a single column that runs either top to bottom or side to side. I want to display 4 across and then I want a </tr> to start a new row.
If you can help me or direct me to a web source I would be truly appreciative! Thank you for your interest.
Here is my code:
echo "<table border='1' width='200'>";
if ($row = mysql_fetch_array($result))//{
do{
$photo = $row["photo"];
$descc = $row["descc"];
echo "<td align='center'>";
if ($photo !=null){
echo "<img src='./elemental_jpg/$photo' >";
if ($descc !=null){
echo "<br>$descc";
}//end if inner
}// end if outer
echo "</td></tr>";
} //end do
while ($row = mysql_fetch_array($result));
echo "</table>";
My problem is that I can not get rows and columns; I can only get my pictures to display in a single column that runs either top to bottom or side to side. I want to display 4 across and then I want a </tr> to start a new row.
If you can help me or direct me to a web source I would be truly appreciative! Thank you for your interest.
Here is my code:
echo "<table border='1' width='200'>";
if ($row = mysql_fetch_array($result))//{
do{
$photo = $row["photo"];
$descc = $row["descc"];
echo "<td align='center'>";
if ($photo !=null){
echo "<img src='./elemental_jpg/$photo' >";
if ($descc !=null){
echo "<br>$descc";
}//end if inner
}// end if outer
echo "</td></tr>";
} //end do
while ($row = mysql_fetch_array($result));
echo "</table>";