I need to generate a random number, to the 10th spot between 2 decimals in PHP. Ex. A rand number between 1.2 and 5.7. It would return 3.4 How can I do this? Answer You can use: or even better:
Tag: random
Generating a random password in php
I am trying to generate a random password in php. However I am getting all ‘a’s and the return type is of type array and I would like it to be a string. Any ideas on how to correct the code? Thanks….
PHP code for generating decent-looking coupon codes (mix of letters and numbers)
For an ecommerce site I want to generate a random coupon code that looks better than a randomly generated value. It should be a readable coupon code, all in uppercase with no special characters, only …
Algorithm for generating a random number
I’m looking to generate a random number and issue it to a table in a database for a particular user_id. The catch is, the same number can’t be used twice. There’s a million ways to do this, but I’m hoping someone very keen on algorithms has a clever way of solving the problem in an elegant solution in that the