View Single Post
Old 05-12-2012, 08:31 AM  
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
Quote:
Originally Posted by CyberSEO View Post
Or even shorter:

preg_match_all('/.*?[\?|\.\.\.|\.|\!]+/s', $s, $sentences);
shuffle($sentences[0]);
echo implode(' ', array_map('trim', $sentences[0]));

I was drunk coding! I'll take a look and give it a try.
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote