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

<?php
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?

try this

echo number_format(1.0E+10, 0, '', '');

Why not use the following?

$number='10000000000';
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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.