Neat way of removing excess whitespace and tabbing from strings.
[source language=“php“]
$string = "Tom\tThumb\t is sooooooo\t\t\tdumb";
$string = preg_replace( ‚/\s+/‘, ‚ ‚, $string );
echo $string;
//will echo "Tom Thumb is sooooooo dumb"
[/source]
