Easy Tutorial
❮ Func Filesystem Fileinode Func Mysqli Rollback ❯

PHP parse_str() Function

PHP String Reference Manual

Example

Parsing a query string into variables:


Definition and Usage

The parse_str() function parses a query string into variables.

Note: The magic_quotes_gpc setting in the php.ini file affects the output of this function. If enabled, variables are passed through addslashes() before being parsed by parse_str().


Syntax

Parameter Description
string Required. Specifies the string to parse.
array Optional. Specifies the array name where the variables are stored. This parameter indicates that the variables are stored in an array.

Technical Details

Return Value: No return value.
PHP Version: 4+
--- ---
Changelog: The array parameter was added in PHP 4.0.3.
--- ---

More Examples

Example 1

Storing variables in an array:


❮ Func Filesystem Fileinode Func Mysqli Rollback ❯