urlencode_deep( mixed $value ): mixed
Navigates through an array, object, or scalar, and encodes the values to be used in a URL.
Parameters
-
$value
mixed Required -
The array or string to be encoded.
Return
mixed The encoded value.
Source
File: wp-includes/formatting.php
.
View all references
function urlencode_deep( $value ) {
return map_deep( $value, 'urlencode' );
}
Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Here is an example for string:
Here is an example for array:
Here is a use case for multi word string as url parameter:
Here is a use case for an array multi word string as url parameter:
It’s making spaces between word, if string has space: