04.01.2010, 22:58
I have been attempting to create a selling feature to sell off unwanted vehicles and am using the random() function. its not quite what i would like as i use alot of php but if i cant do anything about it i will settle for it.
basically i want to be able to specify a range that a random number can be
ie any number between 20 and 40
the function appears to only work from 0 - the number you specify
I would also like to be able to round this random number up or down to the nearest 10 or 100 (not sure which yet) but i have been unable to find any documentation saying there is a round() function.
can anyone help?
basically i want to be able to specify a range that a random number can be
ie any number between 20 and 40
the function appears to only work from 0 - the number you specify
I would also like to be able to round this random number up or down to the nearest 10 or 100 (not sure which yet) but i have been unable to find any documentation saying there is a round() function.
can anyone help?