My PHP/Mysql search bar needs each individual word to have a “%” in-between to get it to work.
Does anyone know how to replace the SPACES sent to the url with a “%” instead of the default “+”?
Eg:
“…search.php?find=testing%speed…”
instead of:
“…search.php?find=testing+speed…”
Thanks Heaps.
Well, you can use preg_replace
try:
This is a regular expression to replace spaces(\s), with ‘%’.
And as guido said, you might need %20