Nasıl php pluralize için?

0 Cevap

Tamam bu yüzden bu kod yığın var

<p id="number_of_stations" class="text left"><?php $_GET['count'] != "" ? print "{$_GET['count']} Stations" : print "Number of Stations" ?></p>

ve $ _GET ['count'] 1, 2, 3, 4 veya 5 ya olacak ve ben şu yazdırmak gerekiyor

1 Station
2 Stations
3 Stations
4 Stations
5 Stations

ama yukarıda olması kodu her zaman çoğul formu yazdırmak ve tekil değil

0 Cevap