mercredi 27 novembre 2019

PHP random no repeat

I have 4 numbers to be random select from 1 to 4. How can i create that number will not repeat in 2 or 3 times in a row.

I can't use datebase or cookies and every time is a new user.

<?php

$temp = (rand(1,4));
echo $temp;
?>



Aucun commentaire:

Enregistrer un commentaire