Search code examples
phpmathprogramming-languagesintnotation

PHP - Get rid of notation


I have a very large number here but I cannot get rid of the notation. I want it to display only numbers instead of "4.8357032784585E+24 - 77"

I tried (int)$variable but it didn't help. Suggestions?


Solution

  • Use number_format.

    echo number_format($variable, 0, '.', '');