In ASP, to take care of spaces and /'s in a URL, you can Server.URLEncode() it... is there an equivalent function in PHP?
While we're at it, what's the function that converts it back into HTML (i.e. the equiv of HTMLEncode in ASP)
Thanks a bunch!
-S
rawurlencode will do it...
Dave
=========================================== http://badblue.com/helpphp.htm Free small footprint web server for Windows
What's the difference between rawurlencode and urlencode?
Surojit,
rawurlencode() is historically more accurate than urlencode() and is RFC1738 compliant, whereas urlencode() encodes a data in the same manner as an HTML form submission. Basically, rawurlencode() converts a space to "%20". urlencode() converts the same space to "+". For more info, read the PHP manual at:
http://www.php.net/manual/en/function.rawurlencode.php
and
http://www.php.net/manual/en/function.urlencode.php
Cheers,
Geoff A. Virgo