2cx
07-29-2004, 06:07 AM
Hi, a friend of mine recommended these forums for possible help:
i've got a mysql db with a table called tshirts . Im trying to display all the shirts by category on one page in a table 2 colums wide, been told i need a do while loop ? ive looked up on php.net but didn't really make much sense to me.
while($row= mysql_fetch_array($rs) )
{
$listt .="<td width=25%><div align=center><b>".$row["tshirtname"]."</b><br>";
$listt .="<img src=".$row["mainpicture"]." >";
$listt .="<br>".$row["tshirtdesc"]."<br><b><font size=4>".$row["price"]."</font></b><br>";
$listt .="</td>";
the above code just displays all the shirts in a long horizontal line, thats as far as i can get, ive not got that much knowledge of php or mysql so sorry if this is a stupid question, thanks for any help in advance.
i've got a mysql db with a table called tshirts . Im trying to display all the shirts by category on one page in a table 2 colums wide, been told i need a do while loop ? ive looked up on php.net but didn't really make much sense to me.
while($row= mysql_fetch_array($rs) )
{
$listt .="<td width=25%><div align=center><b>".$row["tshirtname"]."</b><br>";
$listt .="<img src=".$row["mainpicture"]." >";
$listt .="<br>".$row["tshirtdesc"]."<br><b><font size=4>".$row["price"]."</font></b><br>";
$listt .="</td>";
the above code just displays all the shirts in a long horizontal line, thats as far as i can get, ive not got that much knowledge of php or mysql so sorry if this is a stupid question, thanks for any help in advance.