Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

hope someone can help.

Need number_format to show 3 decimal on this.... (actualy 2)

<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()/$_product->getAnzeigeMenge()) ?>

alway used number_format($_value, 3,",",".") but dont know how to get this to work.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
173 views
Welcome To Ask or Share your Answers For Others

1 Answer

you can use like

Try Using this,

echo number_format($_value, '2', '.', ',')

or

echo number_format($_value, '3', '.', ',')

Also please check for

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

hope this will sure help you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...