PHP: 數組轉查詢參數
$params = [
'name' => '湯姆',
'en_name' => 'Tom',
'age' => 23
];
$query = http_build_query($params);
print_r($query);
// name=%E6%B1%A4%E5%A7%86&en_name=Tom&age=23
PHP: 數組轉查詢參數
$params = [
'name' => '湯姆',
'en_name' => 'Tom',
'age' => 23
];
$query = http_build_query($params);
print_r($query);
// name=%E6%B1%A4%E5%A7%86&en_name=Tom&age=23