Skip to content

Instantly share code, notes, and snippets.

View yishn's full-sized avatar
🏳️‍🌈
˚✧₊⁎( ˘ω˘ )⁎⁺✧༚

Yichuan Shen yishn

🏳️‍🌈
˚✧₊⁎( ˘ω˘ )⁎⁺✧༚
View GitHub Profile
@jak
jak / gist:2466500
Created April 22, 2012 19:57
from_time()
<?php
function pluralise($count, $single, $plural = null) {
if ($count == 1 || $count == -1) {
return $single;
}
if ($plural == null) {
$plural = $single . 's';
}
return $plural;