Page 1 of 1

Trouble, number too long

Posted: Sun Dec 10, 2006 6:21 pm
by thiscatis
For a shop i'm creating, i'm sending info to the paypal website to handle the payment.
I get my total shopping cart cost with this code:

Code: Select all

". $b->GetTotalPrice() . "
But this give numbers with more than 2 charachters after the " . " (e.g. , 2.1547)
Paypal doesn't support this and so it blocks the payment.
Is there a way to make sure only the 2 first numbers after the dot are displayed?

Posted: Sun Dec 10, 2006 6:28 pm
by impulse()
I'd suggest

Code: Select all

round