ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Add commas to make large numbers more readable (Stats module)

November 22, 2011 8:52am

Subscribe [3]
  • #1 / Nov 22, 2011 8:52am

    superaven

    107 posts

    Hey, this is probably a dumb question, but I can’t seem to find the answer…

    How do I add commas into large numbers in EE? I’m using the stats module and am receiving long strings with no separators in them like:

    1760972 instead of 1,760,972

    Had assumed it was a localization setting or other type of preference, but not seeing it.

    Thanks.

  • #2 / Nov 22, 2011 12:32pm

    John St-Amand

    865 posts

    Not ideal, but you could use the price format add-on to apply thousand separators.  There are probably other options, but that came to mind when I saw your post.

  • #3 / Nov 22, 2011 7:11pm

    the3mus1can

    426 posts

    You can also turn on PHP on output and then do something like:

    <?php echo number_format({number}); ?>
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases