PHPverse 2025

Voting

: six plus three?
(Example: nine)

The Note You're Voting On

peter at removethisplease dot ddcrew dot com
11 years ago
This seems to do reasonably well as a shuffle() that preserves index assocation:

<?php
function ashuffle (&$arr) {
uasort($arr, function ($a, $b) {
return
rand(-1, 1);
});
}
?>

Obviously only works if PHP has closures enabled...

<< Back to user notes page

To Top