Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Nightcry ncy
Added: Apr 30, 2021 1:54 PM
Modified: Apr 30, 2021 1:54 PM
Views: 4
Tags: no tags
  1. public static function removeAccents($text) {
  2.         $search = explode(",", "ç,æ,œ,á,é,í,ó,ú,Á,É,Í,Ó,Ú,Ñ,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u");
  3.         $replace = explode(",", "c,ae,oe,a,e,i,o,u,A,E,I,O,U,X,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u");
  4.         return str_replace($search, $replace, $text);
  5.     }