Here\'s the json text:
{
\"data\": {
\"current_condition\": [{
\"cloudcover\": \"75\",
\"humidity\": \"63\",
\"observation_time\"
json_decode() with TRUE
as second parameter gives you an associative array. But you're currently trying to access it as an object.
Try the following:
echo $arr['data']['current_condition'][0]['temp_F'];
That´s not how you access arrays in PHP
$array['index']="value";
echo $array['index1']['index2']
For your example:
echo $arr['data']['current_condition'][0]['temp_F']
You can use json to retrieve json result to a variable and then use variable information to display in js.
$.ajax({
'type': 'GET',
'url': 'abc.com,
'dataType': 'json',
success: function (data) {
var response = data;
// alert(response.data.current_condition) //something like that
// for (var i = 0; i < response.length; i++) { }
}