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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment