in my functions.php if have this code:
echo '<a href="'.preg_replace('/\s/','-',$search).'-keyword1.html">'.urldecode($search).'</a>';
this removes the special chars..
but how can i additonally add remove space and replace it with – and remove “
so, if someone types in “yo! here” i want yo-here
Try: