把陣列的值透過 GET 方式進行傳遞

把陣列的值透過 GET 方式進行傳遞
$data = array(
1,
4,
'a' => 'b',
'c' => 'd'
);
$query = http_build_query(array('aParam' => $data));
will return
string(63) "aParam%5B0%5D=1&aParam%5B1%5D=4&aParam%5Ba%5D=b&aParam%5Bc%5D=d"
http_build_query() handles all the necessary escaping for you (%5B => [ and %5D => ]), so this string is equal to
aParam[0]=1&aParam[1]=4&aParam[a]=b&aParam[c]=d.
———————————————————————————————————————————
How to get the HTTP authenticated user name in PHP?
$username = $_SERVER[‘PHP_AUTH_USER’];
$password = $_SERVER[‘PHP_AUTH_PW’];
————————————————————-