<?php $locations = array ( 'address' => 'R. da Liberdade, 13 - Boqueirão, Santos - SP, 11025-030, Brasil', 'lat' => -23.9593778, 'lng' => -46.3213139, 'zoom' => 14, 'place_id' => 'ChIJcQuV-KYDzpQR9vS809TSj9I', 'street_number' => 13, 'street_name' => 'Rua da Liberdade', 'street_name_short' => 'R. da Liberdade', 'state' => 'São Paulo', 'state_short' => 'SP', 'post_code' => '11025-030', 'country' => 'Brasil', 'country_short' => 'BR', 'city' => 'Santos', 'neighborhood' => 'Boqueirão', ); $address = []; if (isset($locations['neighborhood'])) $address[] = $locations['neighborhood']; if (isset($locations['city'])) $address[] = $locations['city']; if (isset($locations['state'])) $address[] = $locations['state']; elseif (isset($locations['state_short'])) $address[] = $locations['state_short']; $address = implode(', ', $address); echo $address;
You have javascript disabled. You will not be able to edit any code.