sfx Posted October 10, 2004 Report Posted October 10, 2004 Hei all! Nedaudz help: $query = "SELECT * FROM galery"; $result = mysql_query($query); while($row=mysql_fetch_row($result)){ echo "[B]<table><tr><td>$row[1]</td></tr></table>[/B]"; } un man shito resulti vajag lai vinjsh liek vienaa linijaa tikai triis ierakstu naakoshos triis zemaak utt.
bubu Posted October 10, 2004 Report Posted October 10, 2004 Ak dies, skolā ciklus nemāca rakstīt, vai kā? $query = "SELECT * FROM galery"; $result = mysql_query($query); $i=1; while($row=mysql_fetch_row($result)){ if ($i==1) { echo "[B]<table><tr>"; } echo "<td>$row[1]</td>"; $i++; if ($i==4) { echo "</tr></table>[/B]"; $i=1; } }
Recommended Posts