php parse_str () function syntax
parse_str () function how to use?
php parse_str () shows a function to parse the string into a plurality of variables, the syntax is parse_str (string, array), array if the parameter is not set, the function provided by the variable overwrites existing variables of the same name. Which is good marble member
Role: The query string variable to resolve
Syntax: parse_str (String, Array)
parameter:
parameter | description |
string | It must require the string to be parsed |
array | Alternatively, a predetermined array of storage variable names, variable parameter indicates the change stored in the array. |
Note: If the array parameter is not set, the function provided by the variable overwrites existing variables of the same name. php.ini file magic_quotes_gpc setting affects the output of the function, if enabled, then before parse_str () parsing variables will be addslashes () conversion.
php parse_str () function examples
<?php parse_str("id=23&name=John Adams",$myArray); print_r($myArray); ?>