screenshot hereI have 2 data entries in my "job" database and I want to display them as a list using for loop.
I can only see the first entry in a list and the loop is only works on the first entry.
$select="SELECT * FROM job j JOIN jobtype jt ON j.jobtypeID = jt.jobtypeID JOIN location l
ON j.locationID = l.locationID";
$ret=mysqli_query($connection,$select);
$count=mysqli_num_rows($ret);
$row1=mysqli_fetch_array($ret);
<div class="mb-5">
<?php
for ($i=0;$i<$count;$i++)
{
$arr=mysqli_fetch_array($ret);
$jobTypeName = $row1['jobTypeName'];
$jobTitle = $row1['jobTitle'];
$locationName = $row1['locationName'];
$salary = $row1['salary'];
?>
<div class="row align-items-start job-item border-bottom pb-3 mb-3 pt-3">
<div class="col-md-4">
<span class="badge badge-primary px-2 py-1 mb-3"> <?php echo $jobTypeName ?> </span>
<h2>
<?php echo $jobTitle ?>
</h2>
</div>
<div class="col-md-3 text-left">
<p class="meta"> <strong>Location</strong></p>
<h3>
<?php echo $locationName ?> </h3>
</div>
<div class="col-md-3 text-md-right">
<p class="meta"> <strong>Salary</strong></p>
<strong class="text-black"> <?php echo $salary ?> </strong>
</div>
</div>
<?php
}
?>
</div>