Re: replace striing éèêà

From: Date: Mon, 06 Jun 2005 01:02:46 +0000
Subject: Re: replace striing éèêà
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-216455@lists.php.net to get a copy of this message
Look into strtr() http://www.php.net/strtr It seems to be precisely what you want. John Taylor-Johnston wrote:
Can someone show me how to get rid of international characters in $string? Is there a function already made? You cannot use accented characters in a name reference : <a name="montréal">. I guess this below is a start. Is there a better way? John http://ca.php.net/manual/en/function.str-replace.php $string = "àâéèç"; |$find = array("à", "â", "é", "è", "ç"); ||$||replacewith|| = array("a", "a", "e", "e", "c");|| ||||$onlyconsonants = str_replace($vowels, $replacewith, $string); |


« previous php.general (#216455) next »