Page 1 of 1

total have 30 duck when to display 6 duck on each row

Posted: Wed Sep 28, 2011 1:44 am
by Lphp
total have 30 ducks when to display 6 ducks on each row
How to

Re: total have 30 duck when to display 6 duck on each row

Posted: Wed Sep 28, 2011 10:20 am
by twinedev
5 rows display have ducks

Re: total have 30 duck when to display 6 duck on each row

Posted: Wed Sep 28, 2011 10:51 am
by Christopher
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
}

Re: total have 30 duck when to display 6 duck on each row

Posted: Mon Oct 03, 2011 8:29 pm
by Lphp
Christopher 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
}
Thank you :)