I have a list of variables like this:
<?php
$hh_1_date="Aug 29, 2012";
$hh_1_title="Data 1";
$hh_1_video="FFFnQGX0";
$hh_1_name="Peter Pan";
$hh_1_company="CompTIA";
$hh_1_image="image1.png";
$hh_1_date="Aug 30, 2012";
$hh_1_title="Data 2";
$hh_1_video="FFFRDEX0";
$hh_1_name="Peter Pooh";
$hh_1_company="CompTIA";
$hh_1_image="image2.png";
?>
And then I pull those variables into markup like this - all basic stuff...
<div class="card">
<img alt="..." class="card-img-top" src="<?php echo $hh_1_image?>">
<div class="card-body">
<span class="badge badge-pill badge-dark"><?php echo $hh_1_date ?></span>
<h5 style="color:#0c0c0e"><?php echo $hh_1_title ?></h5>
</div>
</div>
But at the moment I am copying and pasting the above HTML and changing the PHP to _2 then _3 then _4 according to its respective PHP Variable which I know is the wrong way of doing it.
So, what is a faster way? I believe it's called looping?
Thanks