Duh. Yeah, works like a charm.
Thanks,
Ed
On Thu, 6 Nov 2003, Jay Blanchard wrote:
> [snip]
> $price = "1234.567890";
>
> $price = number_format($price, 2, '.', '');
>
> echo $price;
>
> Returns 1234.567890
>
> Should return 1234.57 correct?
> [/snip]
>
> Use a new variable to hold the modif
[snip]
$price = "1234.567890";
$price = number_format($price, 2, '.', '');
echo $price;
Returns 1234.567890
Should return 1234.57 correct?
[/snip]
Use a new variable to hold the modified information
$price = "1234.567890";
$newPrice = number_format($price, 2, '.', '');
echo $newPrice;
--
P
I'm using an example straight from the manual on the php site that
doesn't seem to work.
$price = "1234.567890";
$price = number_format($price, 2, '.', '');
echo $price;
Returns 1234.567890
Should return 1234.57 correct?
Thanks,
Ed
--
PHP General Mailing List (http://www.php.net/)
To unsu
3 matches
Mail list logo