[eluser]helmutbjorg[/eluser]
This is great. Don't know why I didn't think of it!
However you can shorten this out it because both the plural and singular functions already trim and strtolower the $str var...
Code:
/**
* Contextual
*
* Takes a string and a number and decides how to deal with it.
*
* @access public
* @param string
* @return str
*/
function contextual($str, $num)
{
return ($num != 1) ? plural($str) : singular($str);
}