Jump to content

Rand()


Drezard

Recommended Posts

Hello, I want to use the rand() function for a variable.

 

So like:

 

Code:

 

<?php

number = rand();

?>

 

 

But it gives me these errors:

 

Quote:

 

 

Parse error: parse error, unexpected '=' in C:\Program Files\xampp\htdocs\test\rand.php on line 3

 

 

Whats wrong or how can i do this?

 

- Cheers, Daniel

Link to comment
https://forums.phpfreaks.com/topic/37863-rand/
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.