{ ["result"]=> object(stdClass)#4 (1) { ["status"]=> string(7) "success" } ["products"]=> object(stdClass)#5 (1) { ["product"]=> array(100) { [0]=> object(stdClass)#6 (12) { ["id"]=> int(461127585) ["productSellerCode"]=> string(5) "10302" ["title"]=> string(53) "Çok Fonksiyonlu Bere (6 Fonksiyon Bir Arada) - Siyah" ["subtitle"]=> string(53) "Çok Fonksiyonlu Bere (6 Fonksiyon Bir Arada) - Siyah" ["price"]=> string(5) "47.28" ["displayPrice"]=> string(5) "47.28" ["isDomestic"]=> bool(false) ["saleStatus"]=> int(2) ["approvalStatus"]=> int(1) ["stockItems"]=> object(stdClass)#7 (1) { ["stockItem"]=> object(stdClass)#8 (8) { ["optionPrice"]=> string(5) "47.28" ["currencyAmount"]=> string(5) "47.28" ["displayPrice"]=> string(5) "47.28" ["bundle"]=> bool(false) ["id"]=> int(126930369746) ["version"]=> int(4) ["quantity"]=> int(857) ["attributes"]=> object(stdClass)#9 (0) { } } } ["currencyAmount"]=> string(5) "47.28" ["currencyType"]=> int(1) } [1]=> object(stdClass)#10 (12) { ["id"]=> int(461127581) ["productSellerCode"]=> string(5) "81422" ["title"]=> string(39) "Polar Bere Boyunluk Unisex - Kırmızı" ["subtitle"]=> string(39) "Polar Bere Boyunluk Unisex - Kırmızı" ["price"]=> string(5) "38.43" ["displayPrice"]=> string(5) "38.43" ["isDomestic"]=> bool(false) ["saleStatus"]=> int(2) ["approvalStatus"]=> int(1) ["stockItems"]=> object(stdClass)#11 (1) { ["stockItem"]=> object(stdClass)#12 (8) { ["optionPrice"]=> string(5) "38.43" ["currencyAmount"]=> string(5) "38.43" ["displayPrice"]=> string(5) "38.43" ["bundle"]=> bool(false) ["id"]=> int(126930369742) ["version"]=> int(3) ["quantity"]=> int(898) ["attributes"]=> object(stdClass)#13 (0) { } } } ["currencyAmount"]=> string(5) "38.43" ["currencyType"]=> int(1) } [2]=> object(stdClass)#14 (12) { ["id"]=> int(461127576) ["productSellerCode"]=> string(5) "10301" ["title"]=> string(58) "Çok Fonksiyonlu Bere (6 Fonksiyon Bir Arada) - Kırmızı" ["subtitle"]=> string(58) "Çok Fonksiyonlu Bere (6 Fonksiyon Bir Arada) - Kırmızı" ["price"]=> string(5) "47.28" ["displayPrice"]=> string(5) "47.28" ["isDomestic"]=> bool(false) ["saleStatus"]=> int(2) ["approvalStatus"]=> int(1) ["stockItems"]=> object(stdClass)#15 (1) { ["stockItem"]=> object(stdClass)#16 (8) { ["optionPrice"]=> Ekrana gelen değerleri değişkene nasıl atayabilirim ?
6
●87
- 29-11-2020, 10:09:15merhaba ekrandaki gelen verileri php değişkeni olarak nasıl atayabilirim ?
- 29-11-2020, 15:22:40denemeler yaptım ama sonuçlandıramadım.uzmanforum adlı üyeden alıntı: mesajı görüntüle
yukarıdaki çıktı
var_dump($productList, true);
kodu sonrasında listeleniyor. - 29-11-2020, 17:13:12Şunu bir deneyin
var_dump(json_decode(json_encode($productList, JSON_UNESCAPED_UNICODE),true));
- 29-11-2020, 17:44:05cevap için teşekkürler. aynı sonuç listelendi.yahyaaydin adlı üyeden alıntı: mesajı görüntüle
- 29-11-2020, 18:16:58Ürünleri listelemek istiyorsanız aşağıdaki gibi iç içe geçen her array katı için döngü kurarak çözümleyebilirsiniz ;
$data=json_decode(json_encode($productList, JSON_UNESCAPED_UNICODE),true); $urunler=$data['products']['product']; foreach($urunler as $key=>$value){ echo $urunler[$key]['title']; echo "<br><br>"; } - 29-11-2020, 20:49:58yahyaaydin adlı üyeden alıntı: mesajı görüntüle
oldu çok teşekkürler