Script that strips excess white space from string
<?php
$str = 'foo o';
$str = preg_replace('/\s\s+/', ' ', $str);
// This will be 'foo o' now
echo $str;
?>
$str = 'foo o';
$str = preg_replace('/\s\s+/', ' ', $str);
// This will be 'foo o' now
echo $str;
?>
http://us2.php.net/preg_replace »
[Click to add or edit comments])
Please prepend comments below including a date