When developing a card game or a match game, you need to reshuffle or reposition things, which means shuffling the data. So let’s take the most common example — a deck of playing cards — and build a data randomization algorithm.
Here’s the code:
1 | function new_rand($arr){ |
The final result is shown in the image:

