I want to eliminate spaces in my urls. They pop up when sending variables that may contain spaces.
Problem is with urlencode, if I do something like this:
echo "blah" . urlencode("url") . "blah";
then it sticks % codes in for the ? and the = and all that, and my server is not giving me the page.
I could use urlencode only on the non-numeric variables, but this seems kind of messy.
I don't want to just urlencode the variables as they come in, as I need them encoded sometimes, and others not.
I could just use replace to replace blanks with +'s maybe?
What is the best way to do this?