Witajcie serdecznie,
Mam funkcję:
function calculate_quantity_netto(string $quantity, string $garbage): float { $value = float($quantity + (http://www.php.net/str_replace(",", ".", $quantity) * float(http://www.php.net/str_replace(",", ".", $garbage)) / 100)); $value = http://www.php.net/round($value, 2); return http://www.php.net/number_format($value, 2, '.', ''); }
https://www.php.net/manual/en/function.number-format.php
<?php $ile = '3.9000'; http://www.php.net/print http://www.php.net/number_format($ile, 2); ?>
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)