remove whitespace

From: Date: Tue, 07 Nov 2000 23:46:56 +0000
Subject: remove whitespace
Groups: php.general 
Request: Send a blank email to php-general+get-24224@lists.php.net to get a copy of this message
Hi - I suspect there is a function to do this, but I can't find it. I want to remove extraneous whitespace-like characters from a string, so "this is\n a \t string with \nweird spacing" becomes "this is a string with weird spacing" best I can come up with is to use str_replace() to turn all the unwanted chars into plain " "s, then explode() and implode() the string. Is there a faster way?

« previous php.general (#24224) next »