You are here: Re[2]: [PHP] How to format every secound row in a database result « PHP « IT news, forums, messages
Re[2]: [PHP] How to format every secound row in a database result

Posted by Richard Davey on 03/30/05 21:08

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация