T
T
teamtaraz2018-07-04 21:33:08
HTML
teamtaraz, 2018-07-04 21:33:08

How to get a space between numbers?

The question is how to change the price output format,
here is a piece of code

{%if $rates_default.charcode == '₸'%}
 {%$message.fields.p.0.value.num%}<span>₸</span>
 {%/if%}

The result comes out like this
52000000 ₸
And I wanted it to be displayed like this
52,000,000 ₸
or like this
52.0 million ₸

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bkosun, 2018-07-04
@bkosun

Use the string_format (Smarty) or number_format (PHP) function:
https://www.smarty.net/docsv2/ru/language.modifier...
php.net/manual/ru/function.number-format.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question