How to encode a URL in PHP

To encode a URL in PHP you can use the following snippet.
Also take a look at How to decode a URL in PHP.

Sample PHP

urlencode("http://codesnippets.fesslersoft.de/") 

Please Share us:
Please rate this snippet

2 thoughts on “How to encode a URL in PHP

Leave a Reply