echo $ar[cap1];
<?php
$ar = array(
'cap1' => '12',
'cap2' => '14',
'cap3' => '244',
'cap4' => '556',
'cap5' => '53',
);
$rnd = "cap".random_int(1, count($ar));
echo $ar[$rnd];
<div class="swiper-pagination"></div>
.img {
background-size: cover;
height: 100%;
width: 89%;
background-position: center;
background-repeat: no-repeat;
}
<div class="form-item">
<label class="form-item__name" for="new_input">Новое поле</label>
<input class="form-item__field ym-record-keys" type="text" name="new_input" placeholder="Новое поле" id="new_input" required: true">
</div>
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$tel = $_POST['tel'];
$new = $_POST['new_input'];
$name = htmlspecialchars($name);
$email = htmlspecialchars($email);
$tel = htmlspecialchars($tel);
$new = htmlspecialchars($new);
$name = urldecode($name);
$email = urldecode($email);
$tel = urldecode($tel);
$name = trim($name);
$email = trim($email);
$tel = trim($tel);
$new = trim($new);
if (mail("почта@yandex.ru", "Расчет цены", "Новое поле:".$new."Имя:".$name.". почта:".$email.". Tel: ".$tel ,"From: почта@yandex.ru \r\n"))
{ echo "сообщение успешно отправлено";
} else {
echo "при отправке сообщения возникли ошибки";
}?>
$json2 = file_get_contents('https://api.vk.com/method/wall.get?owner_id=-*id_группы*&filter=owner&access_token=**************************************************************');
$vkNews = json_decode($json2, true);
//вывод
foreach($vkNews as $news) {
foreach($news as $news => $n) {
echo '<div class="post"><div class="post_date">' . date('j F '. в .' H:s', $n['date']) . '</div><div class="post_text">'.$n['text'].'</div></div>';
}
}