2017 © Pedro Peláez
 

library pluralize

A simple PHP lib to turn words into their plural form

image

kevinkaske/pluralize

A simple PHP lib to turn words into their plural form

  • Friday, July 28, 2017
  • by kevinkaske
  • Repository
  • 1 Watchers
  • 0 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 31 % Grown

The README.md

pluralize

A simple PHP lib to turn words into their plural form. Based on the rules from Rails pluralize., (*1)

Install via composer

Installation of pluralize is through composer., (*2)

To get started quickly, run the following command, (*3)

composer require kevinkaske/pluralize

Usage

pluralize(single_string,number_int);

Example 1:

$balloon_number = 1;

echo 'You have '.$balloon_number.' '.pluralize('balloon',$balloon_number).'!';

Would output You have 1 balloon!, (*4)

Example 2:

$balloon_number = 2;

echo 'You have '.$balloon_number.' '.pluralize('balloon',$balloon_number).'!';

Would output You have 2 balloons!, (*5)

The Versions

28/07 2017

dev-master

9999999-dev

A simple PHP lib to turn words into their plural form

  Sources   Download

MIT

by Kevin Kaske