Jump to content

experience

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

experience's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i select a random number from an array. [code]$base = array("1","2","3","4","5","6","7","8"); $var = $base[rand(0,7)]; echo "<br>\$var = $var"; [/code] think there is a sumbit button bottom of this code. when i press submit. i want $var to be static and show the number (which is selected once from array with rand() ) after i press the submit button again i want the first number should stay in the screen and $var should choose a new value from array randomly. for example. i pressed submit once. output maybe: [code]$var=3[/code] then i pressed submit again: output: ($var should still be 3) [code]$var=3 $var=7[/code] then i pressed submit again; output: [code] $var=3 $var=7 $var=2[/code] like these. how can i do that ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.