arv Posted April 11, 2008 Report Share 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. Link to comment Share on other sites More sharing options...
Vebers Posted April 11, 2008 Report Share 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 Link to comment Share on other sites More sharing options...
arv Posted April 11, 2008 Author Report Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts