<?php $str = "This is a string with spaces, tabs and newlines present"; $stripped = preg_replace(array('/[\s{2,}]/', '/[\t\n]/'), ' ', $str); echo $str; echo "\n---\n"; echo "$stripped";
You have javascript disabled. You will not be able to edit any code.