This question already has an answer here:
- Random Float between 0 and 1 in PHP 12 answers
How do Generate a random number between 1 and 2 with a possible result of both integer or float in PHP
I try to use rand(1,2) or mt_rand(1,2) but i keep getting between 1 and 2. I want my result so be either 1.3 , 1.1, 1.3 ,2
Aucun commentaire:
Enregistrer un commentaire