Array
(
[coord] => stdClass Object
(
[lon] => 37.62
[lat] => 55.75
)
[sys] => stdClass Object
(
[message] => 0.0329
[country] => RU
[sunrise] => 1395286224
[sunset] => 1395330205
)
[weather] => Array
(
[0] => stdClass Object
(
[id] => 600
[main] => Snow
[description] => light snow
[icon] => 13d
)
)
[base] => cmc stations
[main] => stdClass Object
(
[temp] => -4.1799999999999
[pressure] => 1005
[temp_min] => -5.56
[temp_max] => -2.4
[humidity] => 94
)
[wind] => stdClass Object
(
[speed] => 1.54
[gust] => 3.08
[deg] => 90
)
[snow] => stdClass Object
(
[3h] => 0.25
)
[clouds] => stdClass Object
(
[all] => 80
)
[dt] => 1395309854
[id] => 524901
[name] => Moscow
[cod] => 200
)
$main = $my_data['main'];
echo $main->temp;
var_dump($array);
function mDump($var, $needExit = true, $needVarDump = false) {
echo '<pre>';
if ($needVarDump) {
var_dump($var);
} else {
print_r($var);
}
echo '</pre>';
if ($needExit) exit;
}
echo $array['main']->temp;
echo $array['weather'][0]->description;