[thelist] simple! PHP data display
R.Livsey
R.Livsey at cache-22.co.uk
Thu Aug 22 10:35:01 CDT 2002
> Hi R.,
>
> > // toggle colours
> > $currColour==$colour1 ? $currColour=$colour2 : $currColour=$colour1;
> >
> > echo "<td bgcolor=\"$currColour\">\n";
> >
>
> Personally I'd use a stylesheet and switch classes instead of
> bgcolors, but I definitely agree with the necessity to avoid
> magic numbers wherever possible :-)
>
> Cheers
> Jon
Hi, yeah that’s the way I usually do it.
Either way the code is the same, just instead of switching colour values
you are switching the class names you give the row.
CSS will be able to solve even that soon (alternating bgcolors on rows)
and I for one can't wait :)
Cheers
R.Livsey
Incutio Web Developer
[ PHP | Perl | mySQL | Java ]
w : cache-22.co.uk
e : R.Livsey at cache-22.co.uk
/ Richard at incutio.com
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 24/07/2002
More information about the thelist
mailing list