Phpparse_str () function definition and usage, phpparse_str. Phpparse_str () function definition and usage. the phpparse_strphpparse_str () function parses the query string to a variable and is mainly used to pass values (parameters) between pages ). This article introduces the definition and usage of the php parse_str () function to the coders, phpparse_str
The php parse_str () function parses the query string to a variable and is mainly used to pass values (parameters) between pages ). This article describes how to use the php parse_str () function. For more information, see.
Definition and usage
The parse_str () function parses the query string to a variable.
Note: If the array parameter is not set, the variable set by this function overwrites the existing variable with the same name.
Note: The magic_quotes_gpc setting in the php. ini file affects the output of this function. If enabled, the variable will be converted by addslashes () before parse_str () resolution.
Syntax
parse_str(string,array)
Parameters |
Description |
String |
Required. Specifies the string to be parsed. |
Array |
Optional. Specifies the name of the array that stores the variable. 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.3ArrayParameters. |
Instance
Store variables in the array:
<?php parse_str("name=Bill&age=60",$myArray); print_r($myArray); ?>
The definition and usage of the above php parse_str () function is all the content that I have shared with you. I hope to give you a reference and support for the house of friends.
The definition and usage of the http://www.bkjia.com/PHPjc/1133100.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1133100.htmlTechArticlephp parse_str () function, phpparse_str php parse_str () function parses the query string to the variable, mainly used to pass values between pages (parameters ). This article is intended for codenon...