PHP Function: Word Jumbler
This is the function I built to power my word jumble site, JumblePop.com. The script is pretty robust for a simple string randomizer. It has the ability to jumble single words, multiple word-words (ie: words with spaces) and word lists. The script performs a randomized jumble of each word in the list and then checks to make sure the randomly jumbled word does not equal the actual word (something that is common on words with 3 or less characters). If the words do match the script performs a manual jumble with some minor randomization that ensures the words are not the same. The function outputs both the jumbled word and the actual word so that they can be compared to user input. Download it and give it a try or head over to JumblePop.com to see how it works.



Comments