Menu
I am using this (simplified):
[code=php]
$allowed = ‘A-Za-z0-9’;
$mystring = ‘hello’
echo preg_replace(‘/[^’.$allowed.’]/i’,”,$mystring);
to remove any unwanted characters from the string, it works fine, *but
The whole point of this is that I want to allow accented characters, so I could change $characters to include characters like á: but what happens if a user enters an accented character I don’t want like say ÿ??