PHP: Hypertext Preprocessor (original) (raw)

mb_parse_str

(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)

mb_parse_str — Parse GET/POST/COOKIE data and set global variable

Description

Parameters

string

The URL encoded data.

result

An array containing decoded and character encoded converted values.

Return Values

Returns [true](reserved.constants.php#constant.true) on success or [false](reserved.constants.php#constant.false) on failure.

Changelog

Version Description
8.0.0 The second parameter was no longer optional.
7.2.0 Calling mb_parse_str() without the second parameter was deprecated.

See Also

Found A Problem?

kehaovista at qq dot com

9 years ago

`$str = 'email=kehaovista@qq.com&city=shanghai&job=Phper';
mb_parse_str($str, $result);
print_r($result);

//结果
Array
(
[email] => kehaovista@qq.com
[city] => shanghai
[job] => Phper
)

`