latte filter number and php function number

kleinpetr
Backer | 475
+
0
-

Hi

i have a special problem with formating number.

if i use number filter in template

{var $number = -0.34123}
{$number|number:2:',':' '}

output is: –0.35

and then if i use number() function

<?php number(-0.34123,2,',',' '); ?>

output is –0.34

How is it possible ?? Thanks for help

Last edited by kleinpetr (2015-09-03 16:43)

greeny
Member | 406
+
0
-

Php does not have a function called number. I quess you mean number_format function.

I just tried it on my laptop (PHP: 5.5.9–1ubuntu4.9, Tracy: 2.3.4, Server: Apache/2.4.7 (Ubuntu), Latte: 2.3.4) and got twice –0.34.

Comments

kleinpetr:

sorry, fault was on my side

3 years ago