Re[2]: How to format every secound row in a database result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Leif,

Wednesday, March 30, 2005, 6:54:15 PM, you wrote:

LG> http://www.devtek.org/tutorials/alternate_row_colors.php

There is no need to involve a math heavy modulus function just to
alternate row colours! The following single line will do it just as
well, swap the colours for whatever you need and echo them where
required:

$bgcolor = ($bgcolor === '#daf2ff' ? '#c9e1ef' : '#daf2ff');

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I do not fear computers. I fear the lack of them." - Isaac Asimov

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux