Hi all,
I want to replace these charachters:
Æ,Ø,Å,æ,ø,å, with,
AE,OE,AA,ae,oe,aa
I thoght I could use preg_replae this way to accomplish that, but if i write this word in the form: "Bælter" - All that is left to be inserted into the DB is "B" - So I am removing everything from the special charachter away from the string...
This is what i have:
$search = array('/Æ/', '/Ø/', '/Å/', '/æ/', '/ø/', '/å/', '/ /');
$replace = array('AE', 'OE', 'AA', 'ae', 'oe', 'aa', '-');
$vare_gruppe_url = preg_replace($search,$replace,$vare_gruppe_url);
I am using utf-8 - and have read that preg_replace doesnt work too well with 2 byte charachters, i think that was how it was described..
Can someone point out why this is happening and not working?
Basically what i want is this:
"Bælter" should become "Baelter".
Regards, Klemme