I have some strings that contain & # 234 ; or other special character, i want to normalise them so i can use them in database, urls etc.

What i started is below, but i can not belief there isn't a php function for it, anyone now which one?

$phrase = 'itali& # 234 ;';
$find   = 


$replace  	= array("i","i","i","i","i","i","i","i","u","u","u","u","u","u","u","u","c","c",
$slug = str_replace($find, $replace, $phrase);

// slug is : italie
Member Avatar


html_entities() and html_entity_decode() will do most of the symbols you note. In php, there shouldn't be a need to use html encoding.

For urls, have a look at the php manual on urlencode(). htmlentities usually does the job though.