encodeURIComponent.php
Table of Contents
Functions
- encodeURIComponent() : string
- Return the URI component-encoded string of a value.
Functions
encodeURIComponent()
Return the URI component-encoded string of a value.
encodeURIComponent(string $value) : string
This helper wraps the ArangoDB AQL function ENCODE_URI_COMPONENT(value) which
returns the URI component-encoded version of the input string. This is useful
for encoding special characters in URL components.
Example AQL usage:
ENCODE_URI_COMPONENT("hello world") // returns "hello%20world"
ENCODE_URI_COMPONENT("a+b=c") // returns "a%2Bb%3Dc"
ENCODE_URI_COMPONENT(doc.name) // returns encoded name
Parameters
- $value : string
-
String expression to encode.
Tags
Return values
string —The formatted AQL expression.