grrr ... I rear my ugly head, briefly ...
Ron Piggott schreef:
I am trying to scramble individual words and/or phrases.
try harder.
<?php
function mixit($m) {
return trim(chunk_split(str_shuffle(strtoupper($m[1])),1,' '));
}
echo preg_replace_callback('#(\w+)#', 'mixit', 'The rain. in Spain falls, mainly
"on" the plain!');
?>
have integrity, read these before you copy, paste 'n' use:
http://php.net/chunk_split
http://php.net/preg_replace_callback
questions on a postcard to Dan Brown, he just got married, he deserves it ;-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php