Re: Unwanted Characters

From: Date: Sun, 25 Feb 2001 06:05:39 +0000
Subject: Re: Unwanted Characters
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41546@lists.php.net to get a copy of this message
Look at the chr() function - figure out what the character is (number wise) and then do an ereg_replace(chr(),'',$string) (from the hip - you can do a replace with chr() on one of the replaces, I've done it before) --Joe On Sun, Feb 25, 2001 at 12:34:21AM -0500, Clayton Dukes wrote: > > How do I remove unwanted/unprintable characters from a variable? > > $sometext = "ThÀe cØar röøan over mÖy dog" > needs to be filtered and reprinted as: > "The car ran over my dog" > > > > > Thanks :-) > Clayton Dukes > -- ------------------------------------------------------------------------------- Joe Stump, PHP Hacker, joestump98@yahoo.com -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V -------------------------------------------------------------------------------

« previous php.general (#41546) next »