Welcome Guest, Not a member yet? Register   Sign In
Character replacing inside a string
#6

[eluser]hugle[/eluser]
Hello

you can also do smth liek this:
Code:
$find = array ('ą', 'č', 'ę');
$replace = array ('a', 'c', 'e');

$str = str_replace($find, $replace, $str);

You could also try mb_str_replace, it handles UTF8 better, much better!
good luck!


Messages In This Thread
Character replacing inside a string - by El Forum - 12-05-2009, 10:13 AM
Character replacing inside a string - by El Forum - 12-05-2009, 10:30 AM
Character replacing inside a string - by El Forum - 12-05-2009, 10:32 AM
Character replacing inside a string - by El Forum - 12-05-2009, 11:10 AM
Character replacing inside a string - by El Forum - 12-05-2009, 11:13 AM
Character replacing inside a string - by El Forum - 12-05-2009, 06:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB