PHP
4
Вклад в тег
for($i = 0; $i < sizeof($cart2); $i++)
{
echo
'
<div class="card p-3 col-12 col-md-6 col-lg-3">
<div class="card-wrapper media-container-row media-container-row">
<div class="card-box">
<p class="mbr-text mbr-fonts-style display-7">'.$cart2[$i]['title'].'<br></p>
<h3 class="mbr-section-subtitle mbr-fonts-style display-4"><a href="popup:#mbr-popup-e" class="text-black" data-toggle="modal" data-target="#mbr-popup-e">УСЛОВИЯ</a></h3>
</div>
</div>
</div>
';
}
$address = 'Самара,улица+22+Партсъезда,+15';
$parameters = array(
'apikey' => 'token',
'geocode' => $address, # Самара,улица+22+Партсъезда,+15
'format' => 'json'
);
$response = file_get_contents('https://geocode-maps.yandex.ru/1.x/?'. http_build_query($parameters));
$obj = json_decode($response, true);
$cord = str_replace(" ", ",", $obj['response']['GeoObjectCollection']['featureMember'][0]['GeoObject']['Point']['pos']);
$parameters = array(
'apikey' => 'token',
'geocode' => $cord,
'kind' => 'metro',
'format' => 'json'
);
$response = file_get_contents('https://geocode-maps.yandex.ru/1.x/?'. http_build_query($parameters));
$obj = json_decode($response, true);
$metro = $obj['response']['GeoObjectCollection']['featureMember'][0]['GeoObject']['name'];
echo $metro;