in reply to Re: Re: random numberin thread random number
#splice is still O(n)
$array[$index] = $array[-1];
True. And that's a neat solution.
It would still be better to shuffle the array and simply pop the next one when you need it as was suggested at near the top of the thread.
Examine what is said, not who speaks.
Bought a souvenir
Emailed all my friends about it
Got blowed up
Hit him right dead in the jaw
Made it awkward
Took a selfie
Want to go home
Results (356 votes). Check out past polls.