<div class="col-md-4">
<article class="card mb-4">...</article>
<article class="card mb-4">...</article>
</div>
<?php
$chunks = array_chunk($data, 2); // 2 - размер чанка
foreach ($chunks as $chunk) {?>
<div class="col-md-4">
<?php
foreach ($chunk as $article) {?>
<article class="card mb-4"><?php echo $user_name_id; ?></article>
<?php
}?>
</div>
<?php
}
?>
<div class="col-md-4">
<article class="card mb-4">...</article>
<article class="card mb-4">...</article>
</div><div class="col-md-4"> пусто </div>
<article class="card mb-4">
объединить в один блок <div class="col-md-4">
и продолжить далее, до 10?<div class="col-md-4">
<article class="card mb-4">...</article>
<article class="card mb-4">...</article>
</div>
<div class="col-md-4">
<article class="card mb-4">...</article>
<article class="card mb-4">...</article>
</div>
<div class="col-md-4">
<article class="card mb-4">...</article>
<article class="card mb-4">...</article>
</div>
https://api.telegram.org/bot123456789/replyKeyboardMarkup?keyboard=[["\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438"],["\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430"],["\u0413\u0438\u0444\u043a\u0430"]]
$telegram = API_URL . "sendmessage?chat_id=" . $chat_id . "&text=" . $reply . "&reply_markup:" . $reply_markup;