0

I am having troubles with decoding json array. I have an external url in json format: http://genie.kz/api.json

And i am trying to get with function file_fet_contents then decode it.

Here is the code:

$data = json_decode( file_get_contents( 'http://genie.kz/api.json' ), true );

foreach($data as $item) {
    echo $item['code'];
}

However, i could not get any values and var_dump() retrives NULL.

Thanks in advance.

0 Answers0