You are viewing an older version of the site. Click here to view
the latest version of this page. (This may be a dead link, if so, try the root page of the docs
here.)
== url_encode ==
Copy Code
The output would be:
URL Encodes the parameter given. This escapes all special characters per the x-www-form-urlencoded format.
=== Vital Info ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| url_encode
|-
! scope="row" | Returns
| string
|-
! scope="row" | Usages
| param
|-
! scope="row" | Throws
|
|-
! scope="row" | Since
| 3.3.1
|-
! scope="row" | Restricted
| No
|-
! scope="row" | Optimizations
| None
|}
=== Usages ===
url_encode(param)=== Examples === ====Example 1==== Basic usage Given the following code:
url_encode('A string with special characters: !@#$%^&*()-+')

1 {{function|url_encode}}('A string with special characters: !@#$%^&*()-+')
:A+string+with+special+characters%3A+%21%40%23%24%25%5E%26*%28%29-%2B
Find a bug in this page? Edit this page yourself, then submit a pull request. (Note this page is automatically generated from the documentation in the source code.)