I need to check the number of miles of products. And if it is 1 it need to be
mile
, if is more than 1 it need to be
miles
Can anybody help me?
<span class="text-red">
if(<?= $this->product->getMiles() ?> == 1) {
<span><?= $this->product->getMiles() ?> mile</span>
} else {
<span><?= $this->product->getMiles() ?> miles</span>
}
</span>