Websites for sale:
Used Cars for Sale - $175 and Car Sale.
If interested drop me a line at ken@kensfi.com. Thanks!
Have questions about Toronto? Check my latest project: Ask about Toronto!
Randomize sentences into a phrase using PHP functions
I was looking for a while to find a sentence randomizer from a phrase and I didn’t find anything. There are scripts for randomize words but for clauses nothing. I don’t know php but with little (little bit more actually) help I did it.
Copy this code into a webpage, replace the phrase with yours and you will have at every page refresh a new phrase. The sentences will rotate random, in no specific order.
[sourcecode language='php']
< ?
$phrase = 'What does pride in your work have to do with stopping support for IE6. A browser that debuted EIGHT years ago. This is ridiculous. Any developer that continues to create hack or workarounds for this abysmal browser should lose their job.';
$sentences = explode("." , $phrase);
shuffle ($sentences);
foreach ($sentences as $element) {
echo $element . ". ";
}
?>[/sourcecode]
Don’t forget, after you paste the code to replace the line numbers. Unfortunately I couldn’t find any way to remove it.
If you enjoyed this post, make sure you subscribe to my RSS feed!Related tech articles
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Please read before commenting:
I don't tolerate spam comments. Be human and polite. If you are signing as "Computer repairing", "iPhone store" or other kind of bullshits you'll be marked as spam.
USE YOUR NAME! Thanks!


Thanks a million man. You don’t know how timely this was for me.