while($row = mysql_fetch_array($result)){
$search = ” . $row[‘searchquery’];
echo ” …
but if someone types in äöü, it doesnt show the letters – with rawurlencode thats possible, but I want to remove the blank spaces with pregreplace and replace it with +
is that possible?
The answer to your question would be to use a regular expression function that can actually handle UTF-8 strings.
You could also use the
/umodifier for thepregfunctions:This seems better, but you should be careful. I’ve tried it now, and it outputs your characters fine, but I noticed it stripped out some other UTF-8 characters I’ve given it as input (ăşţ).
zaf is right, there are easier ways to do this :).