You are here: Re: php shortcuts « PHP Programming Language « IT news, forums, messages
Re: php shortcuts

Posted by Andy Hassall on 08/21/06 22:40

On 21 Aug 2006 05:37:27 -0700, "laredotornado@zipmail.com"
<laredotornado@zipmail.com> wrote:

>Wanted to see if there was an even shorter way to do this using PHP
>4.3. I have a GIF of a star. In my code, I have a variable, $rating,
>which could be any number between 1 and 5. I want to display a star
>for each rating point. Is there an even shorter way to output that
>code other than the traditional for loop?

A for loop would be both short and clear, so I don't think there's much room
for improvement there.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

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

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