Jump to content

Archived

This topic is now archived and is closed to further replies.

ItsWesYo

Scramble

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
[url=http://us2.php.net/manual/en/function.str-shuffle.php]str_shuffle[/url]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.