Hello everyone,
I appreciate for your time. I have searched a lot and tried to understand and use urlencode, but the problem can't be solved.
The code is:
<?php print 'index.php/?page=search?query='.quote_replace(addmarks($search_results['did_you_mean'])).'&search=1'?>
.
Thanks a lot for your help.