php shortcuts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • laredotornado@zipmail.com

    php shortcuts

    Hi,

    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?

    Thanks, - Dave

  • Janwillem Borleffs

    #2
    Re: php shortcuts

    laredotornado@z ipmail.com schreef:
    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?
    >



    JW

    Comment

    • Andy Hassall

      #3
      Re: php shortcuts

      On 21 Aug 2006 05:37:27 -0700, "laredotornado@ zipmail.com"
      <laredotornado@ zipmail.comwrot e:
      >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.u k :: http://www.andyh.co.uk
      http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

      Comment

      Working...