public static function plural($string)
	{
		//assign the input string to a result variable
		$result = $string;

		//loop through the array of plural patterns, getting the regular exppression friendly pattern
		foreach (self::$plurals as $rule => $replacement) 
		{
			//get the regular axpression friendlt pattern
			$result = $string;

			//check if there is a match for this pattern in the input string
			if ( preg_match($rule, $string) ) 
			{
				//if match found, replace rule with the replacement string
				$result = preg_replace($rule, $replacement, $string);

				//break out of loop once match is found
				break;

			}

		}

		//return the new string contained in result
		return $result;

	}
public static function plural($string)
	{
		//assign the input string to a result variable
		$result = $string;

		//loop through the array of plural patterns, getting the regular exppression friendly pattern
		foreach (self::$plurals as $rule => $replacement) 
		{
			//get the regular axpression friendlt pattern
			$result = $string;

			//check if there is a match for this pattern in the input string
			if ( preg_match($rule, $string) ) 
			{
				//if match found, replace rule with the replacement string
				$result = preg_replace($rule, $replacement, $string);

				//break out of loop once match is found
				break;

			}

		}

		//return the new string contained in result
		return $result;

	}
public static function plural ( $ string ) { //assign the input string to a result variable $ result = $ string ; //loop through the array of plural patterns, getting the regular exppression friendly pattern foreach ( self :: $ plurals as $ rule => $ replacement ) { //get the regular axpression friendlt pattern $ result = $ string ; //check if there is a match for this pattern in the input string if ( preg_match ( $ rule , $ string ) ) { //if match found, replace rule with the replacement string $ result = preg_replace ( $ rule , $ replacement , $ string ) ; //break out of loop once match is found break ; } } //return the new string contained in result return $ result ; }
This method gets the plural form of an input string

@param string $string Input string for which to find plural
@return string The output string after chaning to plural
This method gets the plural form of an input string