Function : inflect

Inflect is a simple function that either adds or removes the last "s" character of a string based on the integer value supplied to it as a second argument.

Syntax
  inflect($value, $count, $strict)
  
  where:

  $text   : string or array list of text strings
  $count  : integer used to determine the quantity of $text 
  $strict : strict automation of addition or removal of last "s" character.
   
                  
Sample 1
  inflect("Boy", 1);  //Boy - (will add "s" if $count is greater than 1)
                  
Sample 2
  inflect("Boy", 2);  //Boys - (adds "s" because $count is greater than 1)
                  
Sample 3
  inflect("Boy", 2, true);  //Boys - (adds "s" if $count is greater than 1 and last character is not "s") 
                  
Sample 4
  inflect("Boys", 2, true);  //Boys - (adds "s" if $count is greater than 1 and last character is not "s") 
                  
Sample 5
  inflect("Boys", 1, true);  //Boy - (removes last "s" if $count is less than 1)