Search query , multiple words ?

#8
[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!


Messages In This Thread
Search query , multiple words ? - by El Forum - 05-08-2009, 01:17 PM
Search query , multiple words ? - by El Forum - 05-08-2009, 01:27 PM
Search query , multiple words ? - by El Forum - 05-08-2009, 01:59 PM
Search query , multiple words ? - by El Forum - 05-08-2009, 03:44 PM
Search query , multiple words ? - by El Forum - 05-08-2009, 03:59 PM
Search query , multiple words ? - by El Forum - 05-08-2009, 04:21 PM
Search query , multiple words ? - by El Forum - 05-08-2009, 04:45 PM
Search query , multiple words ? - by El Forum - 05-08-2009, 04:55 PM
Search query , multiple words ? - by El Forum - 08-21-2009, 11:39 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.