N
N
Nubbin2017-09-26 14:54:12
PHP
Nubbin, 2017-09-26 14:54:12

Division and rounding?

Good afternoon.
I have a small problem with rounding.

$result = ($x / $y);

echo $result; //Вывод: 433839.47939263
//Как сделать чтобы после точки было не 8 значений а 4.

number_format() - doesn't help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
display: block, 2017-09-26
@qork

round($result, 4);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question