$_GET variable cannot identify the first array element.:
I have passed an array in url which looks like this
http://www.example.com/form.php?action=buy_now&ft=prf&Arrayproducts_id[]=431&products_id[]=432&Arraycart[]=1&cart[]=3&Arrayid[]=431&id[]=432
but when i print the array "products_id" and "cart" by using print_r($_GET), it just display me
Array
(
[0] => 432
)
Array
(
[0] => 3
)
now as u can see the url it also contains the value "431" for products_id and "3" for cart I can see that due to the string "Array" appended to these they are not being accessed, So could someone suggest me how to fix this issue
EDIT as per Felix review
for($t=0;$t<4;$t++){
$proid_30 .= "products_id[".$t."]=".$products_id."&";
$bucket_30 .= "cart[".$t."]=".$_SESSION['qty_flex'][$t]."&";
$idproid_30 .= "id[".$t."]=".$products_id."&";
}
$idproid_30.=" ";
$idproid_30 = str_replace("& ","",$idproid_30);
echo "<script>window.location= '/print_ready_form.php?action=buy_now&ft=prf&".$proid_30.$bucket_30.$idproid_30."&osCsid=".$_GET['osCsid']."';</script>";