1
I have the following result in json:
Array
(
[0] => Array
(
[LocalObservationDateTime] => 2019-11-12T19:20:00-03:00
[EpochTime] => 1573597200
[WeatherText] => Algumas nuvens
[WeatherIcon] => 36
[HasPrecipitation] =>
[PrecipitationType] =>
[IsDayTime] =>
[Temperature] => Array
(
[Metric] => Array
(
[Value] => 28.7
[Unit] => C
[UnitType] => 17
)
[Imperial] => Array
(
[Value] => 84
[Unit] => F
[UnitType] => 18
)
)
[RealFeelTemperature] => Array
(
[Metric] => Array
(
[Value] => 32.7
[Unit] => C
[UnitType] => 17
)
[Imperial] => Array
(
[Value] => 91
[Unit] => F
[UnitType] => 18
)
)
[...]
I’m trying to catch up with PHP this way:
<?php
$detalhes = $data["WeatherText"];
//também tentei desta forma abaixo:
$detalhes = $data->WeatherText;
?>
I make a var_dump($detalhes)
, returns NULL
Where I’m going wrong?
Thank you for the reply. At the moment the API I am using has exceeded the daily request limit. Tomorrow I’ll try again and come back here with the result.
– Léo
@Leo, OK, I’m waiting for the result.
– Augusto Vasques
worked out, grateful!
– Léo