Function singular($string), convert a plural word to singular. To get perfect result parameter $string should be a single word. The function will return string.
singular($string)
$string
string
echo singular("books"); //prints 'book'