ItsWesYo Posted July 25, 2006 Share Posted July 25, 2006 By now, you're probably thinking that I'm annoying you with these basic questions >_>Anyway, how would I go about making a simple word scramble code? Quote Link to comment https://forums.phpfreaks.com/topic/15618-scramble/ Share on other sites More sharing options...
ryanlwh Posted July 25, 2006 Share Posted July 25, 2006 split the words into an array with explode() and use shuffle()[code]$str = "this is a test";$words = explode(' ',$str);shuffle($words);echo implode(' ',$words);[/code] Quote Link to comment https://forums.phpfreaks.com/topic/15618-scramble/#findComment-63600 Share on other sites More sharing options...
effigy Posted July 25, 2006 Share Posted July 25, 2006 [url=http://us2.php.net/manual/en/function.str-shuffle.php]str_shuffle[/url] Quote Link to comment https://forums.phpfreaks.com/topic/15618-scramble/#findComment-63606 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.