- var_dump: documentation ( source)
- str_replace: documentation ( source)
- strtoupper: documentation ( source)
<?php
function replace_old_chrs_utf8($str) {
$vd = strtoupper('ð');
$old = array('æ', 'Æ', 'è', 'È', 'ð', $vd);
$new = array('ć', 'Ć', 'č', 'Č', 'đ', 'Đ');
$fin = str_replace($old, $new, $str);
return $fin;
}
$testString = 'æ-Æ bananna è moose Èð';
var_dump(replace_old_chrs_utf8($testString));