I have my look in twing
and I have an array that has or hasnt the key value I need to check it if it exists?
example {{ weather.wind.deg }}
, and at the moment it is possible there is no deg wind, so the weather.wind array will not contain the witch deg key element; how can I check if it is or not? maybe I should do it before I see it before my eyes? somewhere here?
$app->get('/', function () use ($app) { return $app['twig']->render('index.html.twig', array( 'weather' => $app['weather_service']->get($app['location_service']->get()), 'location' => $app['location_service']->get()) ); });
source share