Answer the question
In order to leave comments, you need to log in
Json_decode how to extract a variable from this data?
Good evening. I’m studying json , I
broke my head - I can’t pull out the variable in any way, the
server gives the answer (there are no working examples, unfortunately)
array(6) { ["success"]=> int(1) ["result"]=> array(32) { ["id"]=> string(9) "200473628" ["name"]=> string(63) "Штаны джоггеры DISTRICT ANTI SYSTEM (Черный)" ["category"]=> string(4) "1699" ["saleType"]=> string(4) "Sale" ["longevity"]=> string(2) "60" ["listDateTime"]=> string(19) "2020-10-10 23:38:22" ["endDateTime"]=> string(19) "2020-12-09 23:38:22" ["bestOffer"]=> string(1) "N" ["curencyId"]=> string(1) "2" ["quantity"]=> string(2) "17" ["sold"]=> string(1) "0" ["tags"]=> string(0) "" ["categoryParams"]=> string(0) "" ["bold"]=> string(1) "N" ["recommended"]=> string(1) "N" ["payment"]=> string(4) "BANK" ["localDelivery"]=> string(6) "CHARGE" ["localDeliveryPrice"]=> string(6) "350.00" ["delivery"]=> string(5) "WORLD" ["countryDeliveryPrice"]=> string(6) "600.00" ["worldDeliveryPrice"]=> string(7) "1000.00" ["minimalBuyerRate"]=> string(1) "0" ["condition"]=> string(3) "new" ["numberOfPictures"]=> string(1) "1" ["city"]=> string(2) "32" ["status"]=> string(6) "listed" ["newId"]=> NULL ["price"]=> string(7) "3400.00" ["deliveryText"]=> string(0) "" ["description"]=> string(306) "description(ru-ru):
Модель унисекс с сильно зауженными к низу штанинами на широкой манжете из хлопка.
" ["commonDescriptions"]=> string(5) "26789" ["TZ"]=> string(3) "MSK" } ["account"]=> int(1132835) ["cost"]=> int(1) ["balance"]=> int(9885) ["expire"]=> int(80503979) }
$ticker =var_dump(json_decode($ticker, true));
$result =$ticker['result']['id'];
echo $result;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question