Created
July 19, 2012 20:16
-
-
Save muddylemon/3146475 to your computer and use it in GitHub Desktop.
Letter Scrambler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function scramble($words) { | |
$letter_array = str_split($words); | |
shuffle($letter_array); | |
return implode($letter_array); | |
} | |
// usage | |
echo scramble("Words and stuff"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment