I have to get three random number from 1 to 3 without duplicate value in results
With:
$total = ‘3’;
$rand1 = rand(1,$total);
$rand2 = rand(1,$total);
$rand3 = rand(1,$total);
And results for ex: 1.2.3 or 3.2.1, or 2.1.3
Please help me, thanks in advance
I have to get three random number from 1 to 3 without duplicate value
Share
How about shuffling the array, like so: