Skip to content

Instantly share code, notes, and snippets.

@morganney
Created January 13, 2014 01:05
Show Gist options
  • Select an option

  • Save morganney/8393052 to your computer and use it in GitHub Desktop.

Select an option

Save morganney/8393052 to your computer and use it in GitHub Desktop.
RFC3986 Encoded String with PHP
<?php
// rawurlencode() percent-encodes ~ as %7E
$RFC3986_encoded_string = str_replace('%7E','~',rawurlencode($some_string));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment