I’m trying to generate an array of random numbers from 0-n then shuffle (but ensure that the keys and values DO NOT match).
For example:
0 => 3
1 => 2
2 => 4
3 => 0
4 => 1
Note that both keys and values are from 0-4 but none of the keys and values are the same.
Any thoughts?
1 Answer