Jump to content

[SOLVED] not asigning the random number!!!


PC Nerd

Recommended Posts

i have the followng code and its not setting the correct values to the variable

 


$var1 = rand(1, 3);
$var2 = rand(1, 4);

 

this doesnt save the renaodm numbers, but it does create the variabl

 

i know i havent reassinge the variable contence anywhere, so ts stayed the same

 

i know this becauase i go

 

if (empty($var1)) {echo "var1 is EMPTY!!!!!";}

 

and the same with var 2

 

 

so is this the right way to asigne random numbers, becauase its worked in other parts of the site.

 

thanks

 

Link to comment
https://forums.phpfreaks.com/topic/45516-solved-not-asigning-the-random-number/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.