$cart2 = array(
array('id' => '1', 'title' => 'Название приза', 'event_rules' => 'Правила конкурса')
);
while ($cart2) {
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['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>
';
}
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>
';
}
foreach( $cart2 as $c ) {
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">'.$c['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>
';
}
...
$size = count($cart2);
$x = 0;
while ($x < $size) {
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[$x]['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>
';
$x++;
}