Jun
9
2013

Output case sensitive word

/**
 * Function to provide case sensitive context
 * Context will always only have suffix for 0 or >2 counts
 *
 * @access public
 * @param int count
 * @param string word
 * @param suffix
 * @return string
 */
function tense( $count = 0, $word, $append = 's' )
{
    if( $count == 0 || $count >= 2 )
        $return = $word . $append;
    else
        $return = $word;
        
    return $return;
}

Leave a comment