Jump to content
php.lv forumi

resulta kaartoshana


sfx

Recommended Posts

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.

Link to comment
Share on other sites

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; }
}

Link to comment
Share on other sites

×
×
  • Create New...