Currently I have the following section of code:
<?php if($sales_pages): ?>
<?php foreach($sales_pages as $sale): ?>
<div id ="sales">
<span class"thumbnail"><a href="<?=base_url()?>page/sales/viewsale/<?=$sale->id?>"><img class="thumbnailImg" src="<?=base_url()?>includes/uploads/sales/thumbs/<?=$sale->thumbname?>" alt=""/></a>
<span class="location"><?= $sale->location?></span>
<span class="price"><?= $sale->price?></span>
</span>
</div>
<?php endforeach; ?>
What I am trying to do is the following:
When there are 0 sales (fetched from database) in the foreach I would like my code to display a message
Is elseif the correct way to do this?