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? 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] 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] Link to comment https://forums.phpfreaks.com/topic/15618-scramble/#findComment-63606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.