note 59285 deleted from function.str-replace by nlopess

From: Date: Thu, 01 Dec 2005 21:31:31 +0000
Subject: note 59285 deleted from function.str-replace by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-99431@lists.php.net to get a copy of this message
Note Submitter: mc Reason: bad code ---- Here's an easy remove all extra spaces: //$string="This is formatted weird." $string = preg_replace("/[\s\s]+/", " ", $string); //will return "This is formatted weird."

« previous php.notes (#99431) next »