When the page display results, I want it to say say "We found X products" or "We found 1 Product" rather than "we found 1 products".
The relevant part of my current code is this:
<?php echo sizeof($ids); ?> Products</strong>
How could I extend it to behave more natural?
If count is more than one echo "s".
<?php echo sizeof($ids); ?> Product <?php If(count($ids)>1) echo "s"; ?></strong>
Or you make it easier to read like this:.
If(count($ids)>1) {
Echo sizeof($ids) . " Products.</strong>";
}Else{
Echo sizeof($ids) . " Product.</strong>";
}