WordPress at a glance

wp_parse_str() WP 1.0

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

Uses parse_str() and stripslashes if magic_quotes_gpc is on.

Is the basis for: wp_parse_args()
Hooks from function:
Return

Nothing (null).

Usage

wp_parse_str( $string, &$array );
$string(string) (required)
The string to be parsed.
$array(array) (required)
Variables will be stored in this array.

Code of wp_parse_str: wp-includes/formatting.php VER 4.9.8

<?php
function wp_parse_str( $string, &$array ) {
	parse_str( $string, $array );
	if ( get_magic_quotes_gpc() )
		$array = stripslashes_deep( $array );
	/**
	 * Filters the array of variables derived from a parsed string.
	 *
	 * @since 2.3.0
	 *
	 * @param array $array The array populated with variables.
	 */
	$array = apply_filters( 'wp_parse_str', $array );
}

Related Functions

From tag: PHP analogues (PHP functions replacement)

More from tag: Supporting (helper utility auxiliary)

More from category: Helper Functions

No comments
    Hello, !     Log In . Register