W3cubDocs

/WordPress

wp_parse_str( string $input_string, array $result )

Parses a string into variables to be stored in an array.

Parameters

$input_stringstringrequired
The string to be parsed.
$resultarrayrequired
Variables will be stored in this array.

Source

function wp_parse_str( $input_string, &$result ) {
	parse_str( (string) $input_string, $result );

	/**
	 * Filters the array of variables derived from a parsed string.
	 *
	 * @since 2.2.1
	 *
	 * @param array $result The array populated with variables.
	 */
	$result = apply_filters( 'wp_parse_str', $result );
}

Hooks

apply_filters( ‘wp_parse_str’, array $result )

Filters the array of variables derived from a parsed string.

Changelog

Version Description
2.2.1 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_parse_str