Re: Coloured rows

From: Date: Sat, 05 Jun 2004 15:30:26 +0000
Subject: Re: Coloured rows
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187678@lists.php.net to get a copy of this message
Yeah, you have $number which is the total number of rows, right? so just change the if piece to actually count... $j = 0; while ($i <= $number){ //first 8 rows done here if ($j <= 8) { //print statement here $j++; $i++; } //this piece does the next 8 rows else { //other print statement here $j++; $i++; // if you have more then 16 rows // this next piece should make it repeat the if statement // without having to do too much funky stuff in them if ($j = 16) {$j = 0;} } } > Hi robert, any way of making the script you sent to me, colour 8 rows in > one colour then the next 8 rows a different colour. > > Mark

« previous php.general (#187678) next »