Start New Discussion within our Web Development Community

Well, I'm making this script that deals with numbers that can go up to some VERY large numbers.
Like 1.0E+150

I have tried

echo number_format(1.0E+10);

But that returns 10,000,000,000
I want a way to show that number, but without the comas.

Can anyone help?

Why not use the following?

echo $number.'<br>';
//now some math
echo bcadd($number,'500');
echo '<br>';
echo bcpow('2','2048');

As you can see all numbers can be dealt with as strings using the bcmath library. So this means the size of the number is only limited to the computers ram and cpu instead of 2^63 or 2^31.

Thanks cwarn, but I think hashinclude's way is better, considering I'm using a mysql_fetch_assoc() method.

This question has already been answered. Start a new discussion instead.