Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

mb_parse_str

Description

Parse GET/POST/COOKIE data and set global variable

Syntax

mb_parse_str(
    string $string,
    array &$result
): bool

Parameters

string

The URL encoded data.

result

An array containing decoded and character encoded converted values.

Return

Returns true on success or false on failure.

Examples

1 · result

<?

$string = '🐘key1=🐘value1&🐘key2=🐘value2&🐘key3=🐘value3';

$return = mb_parse_str($string, $result);

print_r($result);

?>
Array
(
    [🐘key1] => 🐘value1
    [🐘key2] => 🐘value2
    [🐘key3] => 🐘value3
)

2 · return

<?

$string = '🐘key1=🐘value1&🐘key2=🐘value2&🐘key3=🐘value3';

$return = mb_parse_str($string, $result);

var_export($return);

?>
true
HomeMenu