Re: Filter based on ctype_print()

From: Date: Mon, 05 Sep 2005 07:50:33 +0000
Subject: Re: Filter based on ctype_print()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-221852@lists.php.net to get a copy of this message
On 9/5/05, Rick Emery <rick@emery.homelinux.net> wrote: > > What I really want to do is replace the non-printable character(s) with > printable character(s) (maybe a question mark, or a space), but haven't > been able to find a function that will do it. Maybe something like: > > $xmlOutput .= '<remark>'; > $xmlOutput .= ctype_print_replace($remarks['Remark'], ''); > $xmlOutput .= '</remark>'; $xmlOutput .= preg_replace('/[^[:print:]]/', '?', $remarks['Remark']); -robin

« previous php.general (#221852) next »