Dani 1,932 The Queen of DaniWeb

I have always known that urlencode() encodes spaces as plus signs and rawurlencode encodes spaces as %20. However, I always struggled to know when to use which. I just finally learned today that you should use rawurlencode() if encoding URI paths and urlencode() if encoding query strings. Who woulda thunk it would be that simple?! :-P