PHP Question - Random Number

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xomedia
    Registered User
    • Mar 2003
    • 35

    #1

    PHP Question - Random Number

    Hi, i made an index.php page now i need the php code to paste in it and make it print a random number between 1 and 25. anyone knows the full php code for this?
    <div align="center"><img src="http://www.xomedia.com/topdogs.gif" width="500" height="30">
  • keyDet79
    Confirmed User
    • Feb 2003
    • 1109

    #2
    rand() - for example: echo rand(1,99);

    Do a search for 'rand' on php.net.

    Multihomed quality BW for less
    ICQ 51034232 - MSN [email protected] - Email keydet(at)vibehosting.com

    Comment

    • Zorgman
      Confirmed User
      • Aug 2002
      • 6103

      #3
      $random = rand(1,25);

      echo "$random";
      ---

      Comment

      Working...