This is a very simple but useful technique. There are a lot of instances where you will need random numbers, and it might be hard to see where you would, but I have use them lots of times for scripts and found this command extremely useful.
This would create a random number between 1 and 100. In most cases you will be puting it to a variable so this would be your code:
PHP Code:
$variable = rand(1,250)
This sets a random number between 1 and 250 to the variable.