Answer the question
In order to leave comments, you need to log in
Why doesn't JSON_DECODE work?
Hello.
I do it like this:
<?php
$result = json_decode(file_get_contents('http://site.com/')); ## С true так же
echo $result->error;
$result = json_decode('{"status":"ok","data":{"action":"list","email":"[email protected]","mail_cnt":"209","my_cnt":"0","games_cnt":"0","list":["[email protected]"]}}');
echo $result->status;
Answer the question
In order to leave comments, you need to log in
Maybe your json does not return error correctly?
Check $result->error with var_dump and write back
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question