Conditional singular/plural output.
Check out format_plural()
TL;DR
$money = 0;
$output = format_plural($money, 'One money', '@count monies');
$output = '0 monies'
$money = 1;
$output = format_plural($money, 'One money', '@count monies');
$output = 'One money'
$money = 2;
$output = format_plural($money, 'One money', '@count monies');
$output = '2 monies'
Written by Ryan Kois
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Drupal
Authors
Related Tags
#drupal
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#