I
I
Ivan Ilyasov2017-07-04 23:29:35
PHP
Ivan Ilyasov, 2017-07-04 23:29:35

How to round a number up to one decimal in Smarty?

Actually, the whole point is described in the question.
For example, the number 14.412 should be rounded up to 14.5 .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Ilyasov, 2017-07-04
@IvanIlyasov

I searched for 2 hours, in the end, I asked a question and in 15 minutes I figured it out myself:
{(($number/0.1)|ceil)*0.1}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question