PHP ? urlencode()
????????????,?????? array_map()
?????????????? urlencode()
,????????????? URL ???????
??,???????? $array
,??????:
$array = array('value1', 'value2', 'value3'); $encoded_array = array_map('urlencode', $array); $result = implode('&', $encoded_array);
??????,$encoded_array
???????:
value1=请求&value2=请求&value3=请求
????????????????????,????? parse_str()
??:
$decoded_array = parse_str($result, $array);
?? $decoded_array
?????????:
Array ( [value1] => value1 [value2] => value2 [value3] => value3 )