PHP Turn special characters to normal ones

Hello experts,

I have a website written in html and php.
There I have form, which among other things requests the user to type in their name and first name.
I have to do some further processing with these data.
The problem is that many users have special characters in their names, and that causes errors in my further processings.
Is there a php function to turn the special characters into normal ones? (i.e. á to a)
I use UTF-8.

Thanks for your help
arthrexAsked:
Who is Participating?
 
niko86Connect With a Mentor Commented:
you could do this with trtr
$yournewstring=strtr($youtstring,"()!$'?:
,&+-/.`R}aS~x¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ",
"--------------SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy");

Open in new window

0
 
hernst42Commented:
0
 
niko86Commented:
iconv will not convert special chars to normal ones, it can convert them to utf-8, but that's not what was requested
0
 
arthrexAuthor Commented:
PERFECT!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.