R
R
Relapse2018-02-22 23:15:32
PHP
Relapse, 2018-02-22 23:15:32

How to display a large number?

The site has a calculation of certain numbers from the database.
Now the sum of these numbers has become so large that now it is displayed like this:
-2.1123423897498E+28 Tell me
how to display the sum in the previous standard form?

echo floor(mysql_result(mysql_query("SELECT SUM(`points`) FROM `users`;"),0));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
twobomb, 2018-02-23
@twobomb

Uh why? Like this?

$s = floatval("-2.1123423897498E+28");
echo number_format($s); //-21,123,423,897,497,998,933,557,772,288

number_format

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question