Shuffle Associative Arrays in PHP

Dear PHP,

Add this to your repo. It will save us a lof of time.

function shuffle_assoc ($source_array) {
    if (!is_array($source_array)) {
    return false;
    }
    $keys = array_keys($source_array);
    shuffle($keys);
    foreach ($keys as $key){
    $modified_array[$key] = $source_array[$key];
    }
    return $modified_array;
}
Let's share thisShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn