The definition and usage of PHP parse_str () functions, PHPPARSE_STR
The PHP parse_str () function parses the query string into a variable, primarily for passing values (parameters) between pages. This article to the Code Farm introduction PHP parse_str () function of the use of the code of interest to farmers can refer to.
Definition and usage
The Parse_str () function parses the query string into a variable.
Note: If the array parameter is not set, the variable set by the function overrides the already existing variable with the same name.
Note: The MAGIC_QUOTES_GPC setting in the php.ini file affects the output of the function. If enabled, the variable is converted by addslashes () before Parse_str () is resolved.
Grammar
| Parameters |
Description |
| String |
Necessary. Specifies the string to parse. |
| Array |
Optional. Specifies the name of the array that stores the variables. This parameter indicates that the variable will be stored in the array. |
Technical details
| return value: |
no return value. |
| PHP version: |
4 + |
| Update log: |
In PHP 4.0.3, the array parameter is added. |
Example
To store variables in an array:
The above PHP parse_str () function definition and usage is the small part of the whole content to share to everyone, I hope to give you a reference, but also hope that we have a lot of support to help guests home.
http://www.bkjia.com/PHPjc/1133100.html www.bkjia.com true http://www.bkjia.com/PHPjc/1133100.html techarticle php parse_str () function definition and usage, phpparse_str PHP parse_str () function to parse the query string into a variable, mainly used to pass values (parameters) between pages. This article to the code Nong ...