Re: preg_replace (character without accents)

From: Date: Fri, 23 Aug 2002 12:38:56 +0000
Subject: Re: preg_replace (character without accents)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-113749@lists.php.net to get a copy of this message
On Friday 23 August 2002 20:23, Danielle van Gladbach wrote: > Hi, > > I'm trying to get character without accents. > In this example, i'm trying to convert "Thïs is a tëst" to "This is a > test", what am i doing wrong? Or is there an easier way to do this? > > $string = "Thïs is a tëst"; > $string = preg_replace("/&*uml;/","",$string); > > output: > string2= Th&is is a t&est Try: $string = preg_replace('/&(.)uml;/', '\\1', $string); -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* You have a deep interest in all that is artistic. */

« previous php.general (#113749) next »