RE: [PHP] Two color rows in table inside while iteration

From: Date: Wed, 28 Apr 2010 14:02:51 +0000
Subject: RE: [PHP] Two color rows in table inside while iteration
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-304731@lists.php.net to get a copy of this message
From: Ashley Sheridan > On Wed, 2010-04-28 at 09:46 -0400, Fernando wrote: > >> But then you need to differentiate the table, otherwise all your tables >> will have the same row formating no? This way you only apply the >> formating to those rows that need it. > > Yes, but one would assume you'd be doing that anyway if you needed this > table to be displayed differently from all the others on your page? The alternate colors should be in a CSS style linked to the TR tag. The base table style is used for the odd rows, with the alternate colors for the even rows. It's very easy to create multiple variations that way. Javascript is definitely out. Only a fool or an imbecile intentionally enables primary malware infection vectors like that. I believe Firefox should install the NoScript add-on by default with maximum protection enabled. Bob McConnell

« previous php.general (#304731) next »