You are here: Re: print table with background colors « PHP Programming Language « IT news, forums, messages
Re: print table with background colors

Posted by Bob Bedford on 12/16/05 09:32

"Ian B" <ianbambury@gmail.com> a écrit dans le message de news:
1134644795.970386.87670@f14g2000cwb.googlegroups.com...
>
> Bob Bedford wrote:
>> I've an other function, probably quicker ? (I hope)
>>
>> for($line=1;$line<26;$line++)
>> echo '<td valign="top" nowrap class="'.((($line%2) ==
>> 0)?"oddrow":"evenrow").'">'
>
> OK, a challenge! If you're going for short code as opposed to
> readability,
>
> change oddrow/evenrow to c1 and c2 and use
>
> '<tr class="c'.($i%2).'">';

Great, I didn't think about such code ! this also save a test !
I like to save time in my script, and you just helped me. Thanks

Bob

 

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

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