Yngvarr

Generation

generate functionThu, 09 Feb 2023

shuffle string

function shuffle_string($string) { $len = strlen($string); for ($i = 0; $i < $len; $i++) { $pos = rand(0, $len - 1); $temp = $string[$i]; $string[$i] = $string[$pos]; $string[$pos] = $temp; } return $string; }

Questions about programming?Chat with your personal AI assistant