PHP : Remove accents


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // Remove accents
  2. function neo_remove_accent($l_str){
  3. $l_match = array('/[àâäåãáÂÄÀÅÃÁæÆ]/','/[ß]/','/[çÇ]/','/[Ð]/','/[éèêëÉÊËÈ]/','/[ïîìíÏÎÌÍ]/','/[ñÑ]/','/[öôóòõÓÔÖÒÕ]/','/[__]/','/[ùûüúÜÛÙÚ]/','/[¥_Ý_ýÿ]/','/[__]/');
  4. $l_replace = array('a', 'b', 'c', 'd', 'e', 'i', 'n', 'o', 's', 'u', 'y', 'z');
  5.  
  6. return preg_replace($l_match, $l_replace, $l_str);
  7. }

URL: http://www.giacomel.fr

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.