Re: preg_replace (character without accents)
| From: | Danielle van Gladbach | Date: | Fri, 23 Aug 2002 12:42:13 +0000 |
| Subject: | Re: preg_replace (character without accents) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113751@lists.php.net to get a copy of this message | ||
Thanks!!!!!
Jason Wong wrote:
> 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.
> */