Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Add Comamas to Smarty output ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
sarahfoxnz
Smarty Regular


Joined: 11 Apr 2010
Posts: 76

PostPosted: Sat Apr 02, 2016 6:01 am    Post subject: Add Comamas to Smarty output ? Reply with quote

Smarty Version: Version: 2.6.26


http://www.smarty.net/forums/viewtopic.php?t=8986

Hello. I have found this old 2006 thread.

I am wondering if there is a built-in modifier, to add commas to large numbers..

EG

1546 = 1,546

658986 = 658,986

62356279 = 62,356,279
Back to top
View user's profile Send private message
sarahfoxnz
Smarty Regular


Joined: 11 Apr 2010
Posts: 76

PostPosted: Sat Apr 02, 2016 7:41 am    Post subject: Reply with quote

Ive used the php number-format function in my main PHP script.

http://php.net/manual/en/function.number-format.php

But there should be an option within the template to do the same.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Apr 02, 2016 9:51 am    Post subject: Reply with quote

You can do it in template exactly the same way.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP