Se vuoi "collassare" gli spazi:
ciaocodice:$str = " ciao a tutti\t\t belli e brutti \t!"; $str = preg_replace("/([ \t]+)/", " ", trim($str));
Se vuoi "collassare" gli spazi:
ciaocodice:$str = " ciao a tutti\t\t belli e brutti \t!"; $str = preg_replace("/([ \t]+)/", " ", trim($str));
eXtending-Php.net coming soon ...