total have 30 duck when to display 6 duck on each row
Posted: Wed Sep 28, 2011 1:44 am
total have 30 ducks when to display 6 ducks on each row
How to
How to
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
for ($i=0; $i<30; ++$i) {
if (($i % 6) == 0) {
// new row
}
// show column
}Thank youChristopher wrote:Check the modulus of the counter and the row width:Code: Select all
for ($i=0; $i<30; ++$i) { if (($i % 6) == 0) { // new row } // show column }