wp_parse_str() WordPress Function

The wp_parse_str() function is a built-in WordPress function. It is used to parse a string into an array.

wp_parse_str( string $string, array $array ) #

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


Parameters

$string

(string)(Required)The string to be parsed.

$array

(array)(Required)Variables will be stored in this array.


Top ↑

Source

File: wp-includes/formatting.php

function wp_parse_str( $string, &$array ) {
	parse_str( (string) $string, $array );

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


Top ↑

Changelog

Changelog
VersionDescription
2.2.1Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More