EE 1
EE 2
Number Format

Developer

Robert Wallis

3rd Party (Free)

102 downloads (last 90 days)

Creative Commons Attribution Download v1.3

Compatibility

  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Better Workflow
  • Matrix

Requirements

  • jQuery for the Control Panel

Categories

Plugin

Tags

Exposes PHP's number_format() function via EE tags.

You can read more about PHP’s number_format function here.

{exp:number_format number="1234.56"}

returns: 1,235

{exp:number_format number="1234.56" 
decimals="2" dec_point="." thousands_sep=","}

returns: 1,234.56

{exp:number_format decimals="2"}1234.56{exp:number_format}

returns: 1,234.56

Works in three ways.

  1. Number as a paramater: {exp:number_format number=“1234” decimals=“2”}
  2. Number as tag content: {exp:number_format decimals=“2”}1234{/exp:number_format}
  3. Number as a publish filter: Setup in the control panel.


Warning this plugin is about the simplest plugin you can make.  So I removed support for it.  If it doesn’t work.  Try using the builtin php number_format function <?php echo number_format(1234.56, 2); ?>

Download Number Format

EE Version Downloads Add-On Version Release Date
2.+ Download 1.3 2012-05-22 10:04 AM
1.x Download 1.0

Number Format Links

This entry was created October 1, 2008, 5:20 pm.
This entry was last updated April 11, 2013, 10:06 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

1 Review:

Robert Wallis 04.11.13

Robert Wallis
Rating - {addon_rating_average}

Hi, this is my plugin, and I think it’s stupid.  So if you agree, then we can both laugh about it.  But honestly, it’s the flashlight-app of EE plugins.