$ _GET Değişkeni ilk dizi elemanı tespit edemez

0 Cevap php

$ _GET Değişkeni ilk dizi elemanı tespit edemez.:

Şöyle url bir dizi geçti

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

i dizisi "products_id" ve print_r ($ _GET) kullanarak "arabası" yazdırırken ama, bu sadece beni görüntülemek

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>";

0 Cevap