mb_parse_str

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

mb_parse_strParse GET/POST/COOKIE data and set global variable

설명

bool mb_parse_str ( string $encoded_string [, array &$result ] )

Parses GET/POST/COOKIE data and sets global variables. Since PHP does not provide raw POST/COOKIE data, it can only be used for GET data for now. It parses URL encoded data, detects encoding, converts coding to internal encoding and set values to the result array or global variables.

인수

encoded_string

The URL encoded data.

result

An array containing decoded and character encoded converted values.

반환값

성공 시 TRUE를, 실패 시 FALSE를 반환합니다.

참고

add a note add a note

User Contributed Notes 1 note

up
3
kehaovista at qq dot com
8 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
)
To Top