Related questions:
My solution is to create two strings - first with not wanted letters and second with letters that will replace firsts.
$from = 'čšć'; $to = 'csc'; $text = 'Gračišće'; $result = str_replace(str_split($from), str_split($to), $text);