I'm trying to read a JSON with a php array. The JSON file is using a format that I am not familiar with and I don't know how to write my PHP array so it could read the file.
JSON file in question can be found here: http://nhlwc.cdnak.neulion.com/fs1/nhl/league/teamroster/ANA/iphone/clubroster.json
The format is giving me hard time because 1) it is starting with a time stamp that my array cannot read and 2) the file is separated between the value position, means that I have a closing statement ' }] ' before the end of the file - seems like they separated category
My PHP array that work with more standard array :
function myFunction(response) {
var arr = JSON.parse(response);
var i;
var out = "<table>";
for(i = 0; i < arr.length; i++) {
out += "<tr><td>" +
arr[i].position +
"</td><td>" +
arr[i].weight +
"</td><td>" +
arr[i].height +
"</td></tr>";
}
out += "</table>"
document.getElementById("id01").innerHTML = out;
}
thank you