Jump to content

How to replace characters like â


magnetica

Recommended Posts

str_replace("â","a", "Banâna");

 

Also, to get more complex.. there's

$stuff = "èœsy Strëët";
$s = explode(",","ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u");
$r = explode(",","c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u");
$newVar = str_replace($s, $r, $stuff);

http://www.randomsequence.com/articles/removing-accented-utf-8-characters-with-php/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.