[eluser]developer10[/eluser]
Hello,
it'll be the best if i simply illustrate my problem with an example:
i want to write a function which would replace non-English character by english ones:
$str = "Ovo je nešto o čemu sada nećemo raspravljati";
into
$str = "ovo-je-nesto-o-cemu-sada-necemo-raspravljati";
I'm a bit familiar with the str_replace() function, but how to make it to search for characters (č,ć,đ,š,ž) in one step and replace them by c,c,dj,s,z respectively?
for now, i can do this:
Code:
function f_ime_seo($replace,$bythis,$str)
{
echo str_replace($replace,$bythis,$str);
}
and it works well, but the problem is i can put into $replace only one character and i want to be able to check for existence of all those character in one step.
Any suggestions would be appreciated! Thanks