September 2001
Intermediate to advanced
768 pages
32h 45m
English
void parse_str(string query_string, [variable $array])
Parses a query string into variables.
Returns:
Nothing
Description:
parse_str() parses a query string (such as "?id=10&name=Ziggy%20Stardust") into variables that are then set in the local scope. If the optional $array argument is set, the variables are stored in $array as an array instead of being set in the local scope.
Note:
PHP automatically handles GET and POST data. In most cases, there is no need to decode query strings with this function.
If the magic_quotes_gpc configuration directive is enabled, the variables are processed with addslashes() before they’re set.
Caution:
If $array is not set, variables parsed out of the query_string overwrite variables that already exist ...
Read now
Unlock full access