mercredi 24 octobre 2018

How do Generate a random number between 1 and 2 in PHP [duplicate]

This question already has an answer here:

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