WordPress at a glance

urlencode_deep() WP 1.0

Navigates through an array, object, or scalar, and encodes the values to be used in a URL.

Works based on: map_deep()
1 time = 0.000011s = very fast | 50000 times = 0.02s = speed of light | PHP 7.0.8, WP 4.6.1

No Hooks.


Mixed. The encoded value.


urlencode_deep( $value );
$value(mixed) (required)
The array or string to be encoded.


Since 2.2.0 Introduced.

Code of urlencode_deep() WP 5.6

function urlencode_deep( $value ) {
	return map_deep( $value, 'urlencode' );

From tag: esc_ (clean validate sanitize)

More from category: Helper Functions

No comments
    Log In