<?php

$count = isset($newContentData['count']) ? intval($newContentData['count']) : 0;

for ($i = 0; $i < $count; $i++) { ?>

    <div class="mb-3">
        <div class="">
            Admitted on <b><?= friendly_date_time($newContentData['item_' . $i . '_date'], false) ?></b>,
            Stay length: <b><?= $newContentData['item_' . $i . '_days'] ?> days</b>
        </div>
        <div class="">
            Related to <b><?= $newContentData['item_' . $i . '_related_to'] ?></b>,
            Procedure: <b><?= $newContentData['item_' . $i . '_procedure'] ?></b>,
            Status: <b><?= $newContentData['item_' . $i . '_status'] ?></b>
        </div>
        <div class="text-secondary pb-2 mb-2">
            <b>Comments: </b><?= $newContentData['item_' . $i . '_comments'] ?>
        </div>
    </div>

<?php }
