$price = 25;
$f_price = sprintf("%01.2f","$price");
echo "$f_price<br>";

This will give you 25.00 instead of 25. Maybe put your result into a
variable and then convert it into the decimal number using the sprintf()
function.

Dimitri Marshall

"Richard Cook" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a problem with the following
>
> when i multiply for example 25 . 50 * 3 i get 76 . 5 how would i get PHP
to
> recognise the last 0 ie make it 76 . 50
>
> Any ideas?
>
>
> Regards
>
> R

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to