arv Posted April 11, 2008 Report Posted April 11, 2008 Kā panākt lai katram trešajam ierakstam ir cits stils. Precīzāk, man vajag izdalīt katru 3. ierakstu no deviņiem.
Vebers Posted April 11, 2008 Report Posted April 11, 2008 (edited) for($i=1; $i<=9; ++$i) { if($i % 3 == 0) { echo "<b>".$i."</b>"; } else { echo $i; } } Edited April 11, 2008 by Vebers
arv Posted April 11, 2008 Author Report Posted April 11, 2008 (edited) paldies. Man gan vajadzēja savienot ar while funkciju, jo dati no datubāzes, bet galā tiku. $i=1; while ($d = mysql_fetch_row($r1)){ if (++$i % 3 == 0) { ... Edited April 11, 2008 by arv
Recommended Posts