Added smartUrlEncode and php docs

Added function smartUrlEncode for the w3c folks, which replaces all '&' with '&amp;' in a query string.
Added PHP Docs.