/ Published in: PHP
Repeatable Fisher Yates Array Shuffle based on given random string. If no seed is provided the current second will be used (not to use as a pure random shuffle... based on microseconds)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function fyshuffle(&$items,$seedstring) { if (!$seedstring) { } else { $seedval = $seedstring; } else { } } $tmp = $items[$i]; $items[$i] = $items[$j]; $items[$j] = $tmp; } }