Re: [PHP] decimal places

2002-11-26 Thread Bryan Koschmann - GKT
TED]>; PHP General |<[EMAIL PROTECTED]> |Sent: Tuesday, November 26, 2002 2:36 PM |Subject: RE: [PHP] decimal places | | | |$amount = 17.9; |$dollars = "$" . number_format($amount, 2); |echo "$dollars"; | |you should see $17.90. |Robbert van Andel | | |-Original Message---

Re: [PHP] decimal places

2002-11-26 Thread Matt Vos
- Original Message - From: Van Andel, Robert <[EMAIL PROTECTED]> To: Bryan Koschmann - GKT <[EMAIL PROTECTED]>; PHP General <[EMAIL PROTECTED]> Sent: Tuesday, November 26, 2002 2:36 PM Subject: RE: [PHP] decimal places $amount = 17.9; $dollars = "$" . number

RE: [PHP] decimal places

2002-11-26 Thread Van Andel, Robert
$amount = 17.9; $dollars = "$" . number_format($amount, 2); echo "$dollars"; you should see $17.90. Robbert van Andel -Original Message- From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 11:29 AM To: PHP General Subject:

Re: [PHP] decimal places

2002-11-26 Thread Kevin Stone
Try.. printf("%.2f", $amount); -Kevin - Original Message - From: "Bryan Koschmann - GKT" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Tuesday, November 26, 2002 12:29 PM Subject: [PHP] decimal places > Hello, > > D

[PHP] decimal places

2002-11-26 Thread Bryan Koschmann - GKT
Hello, Does anyone here have a good way to make sure dollar amounts are formatted properly? I have something that returns data, but the problem is it's stored where any trailing zero isn't kept, like this: $16.95 or $172.82 are fine $17.90 or $190.20 come back as $17.9 and $190.2 I would like t

Re: [PHP] Decimal Places

2002-10-30 Thread dwalker
Fields("UnitPrice"), 2, -2, -2) ?> -Original Message- From: Andrew Wilson <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Tuesday, October 29, 2002 11:34 PM Subject: [PHP] Decimal Places >Hay guys, >I have two variables ( integers )

RE: [PHP] Decimal Places

2002-10-29 Thread Martin Towell
have a look at number_format() -Original Message- From: Andrew Wilson [mailto:will@;netwaynetworks.com.au] Sent: Wednesday, October 30, 2002 3:34 PM To: [EMAIL PROTECTED] Subject: [PHP] Decimal Places Hay guys, I have two variables ( integers ) that are being minused one from the other

[PHP] Decimal Places

2002-10-29 Thread Andrew Wilson
Hay guys, I have two variables ( integers ) that are being minused one from the other and i am printing the result to the screen but i am getting unwanted decimals. print ($eall - $sall) / 1000; My question is what is the easiest way to strip decimals off the above result. The only way i know a