Fork me on GitHub

tips : number formating with smarty  Bottom

  • Smarty allow you to use any existing PHP function as modifier, so for instance in order to format a number

    Code

    <!--[ $topiccount|number_format:' ':0:' ' ]-->


    will give you "27 083", instead of "27083"

    http://fr.php.net/number_format
    http://www.smarty.ne…guage.modifiers.php

    Quote

    Also, all PHP-functions can be used as modifiers implicitly (more below) and modifiers can be combined. .
  • First thing which pops in my head:

    Code

    <!--[ $topiccount|number_format:' ':0:' '|replace:" ":""]-->

    or something like that....
    - Igor
  • 0 users

This list is based on users active over the last 60 minutes.