W tabelce MySQL'a mam np. 9 rekordów i chcem je wyswietlic w nastepujacy sposób:
Kod
1 2 3
4 5 6
7 8 9...
jak to zrobic?
Próbowałem z while() i for(), ale jakos sobie nie moge poradzic
kris_
1.05.2003, 14:01:17
$i=0
$tmp="";
while($row=....)
{
$tmp.=$row[0];
$i++
if($i==3)
{
echo "$tmp";
$i=0;
$tmp="";
}
}
to bardzo nieładny sposób załatwienia sprawy ale działa ;)
Mam!! Pomogl mi nez z #phppl[php:1:7680cf6b9e]<?php
$result = mysql_query("select pole from $tabela");
$result2 = mysql_query("select count(pole) as ile from $tabela");
while($row2 = mysql_fetch_array($result2)) $ile = $row2['ile'];