I am trying to read a JSON from PHP like this:
[{
"titulo": "DontAsk",
"pais": "Austria",
"country_iso": "AT",
"direccion": "Mag. Th. Langmann Gmbh Landstrasse 4",
"cp_ciudad": "A-2000 STOCKERAU",
"lat": "48.385583",
"long": "16.207823",
"telefono": "43-2266-72554-11",
"fax": "43-2266-72554-44",
"web": "www.aaa.com"
}, {
"titulo": "Other One",
"pais": "Czech Republic",
"country_iso": "CZ",
"direccion": "Pod Cihelnou 6",
"cp_ciudad": "664 161 00 PRAHA 6",
"lat": "50.092605",
"long": "14.312707",
"telefono": "420 233 313 578",
"fax": "420 233 313 582",
"web": "www.bbb.com"
}]
The JSON has no errors, I tried with JsonLint and found it clean. I have more insertions, but I only putted 2.
Then I try a code line this:
$json = json_decode(file_get_contents($url), true);
var_dump($json);
The URL returns retrieves the URL well, but in the var_dump returns NULL
I saw a lot of answers and questions, and have not found answer. Some help?
Read Json -> Convert in array in PHP -> Retrieve the array
Thanks