Convert Accented Characters | CSS-Tricks

PHOTO EMBED

Mon Jun 01 2020 05:58:28 GMT+0000 (UTC)

Saved by @Amna #php

function replace_accents($str) {
   $str = htmlentities($str, ENT_COMPAT, "UTF-8");
   $str = preg_replace('/&([a-zA-Z])(uml|acute|grave|circ|tilde);/','$1',$str);
   return html_entity_decode($str);
}
content_copyCOPY

https://css-tricks.com/snippets/php/convert-accented-characters/