[eluser]Madmartigan1[/eluser]
Sorry, my typo, should've been.
Code:
$search=preg_replace('/\s\s+/','%',$search);
If you use preg_replace instead, you will remove multiple spaces just in case.
No need for '%my%%%search%' but it doesnt matter, same thing
str_replace is faster though
Glad you got it working!