total have 30 ducks when to display 6 ducks on each row
How to
total have 30 duck when to display 6 duck on each row
Moderator: General Moderators
Re: total have 30 duck when to display 6 duck on each row
5 rows display have ducks
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: total have 30 duck when to display 6 duck on each row
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
}(#10850)
Re: total have 30 duck when to display 6 duck on each row
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 }