Ana's Lair
Monday, September 21, 2015
remove accents and diacritics from a string in PHP
I needed to remove some diacritics from a text and the easiest way I've found is this:
$newstring = iconv('UTF-8', 'US-ASCII//TRANSLIT', $original_string);
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment