I have a number like -56.98
I need to convert it to -5698. I tried
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
--
PHP General Mailing List (http://www.php.net/)
To
Hello Dustin,
Tuesday, May 10, 2005, 9:34:10 AM, you wrote:
D I have a number like -56.98
D I need to convert it to -5698. I tried
?php
$num = -56.98;
$newNum = str_replace(.,,$num);
echo newNum = . $newNum;
$add50 = $newNum + 50;
echo brAdd50 = . $add50;
$sub50 = $newNum -50;
echo brSub50
Dustin Wish wrote:
I have a number like -56.98
I need to convert it to -5698. I tried
You tried what? Multiplying it by 100?
--
John C. Nichel
berGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi,
Wednesday, May 11, 2005, 1:34:10 AM, you wrote:
DW I have a number like -56.98
DW I need to convert it to -5698. I tried
DW ---
DW Outgoing mail is certified Virus Free.
DW Checked by AVG anti-virus system (http://www.grisoft.com).
DW Version: 6.0.859 / Virus Database: 585 - Release Date:
Hi to all;
Is there any php function that will automatically format the calculated
decimal values in its hundred's,thousand's .places (such as
$423,345,234.50). just like the format() function in MySQL. If not, how
could i do it?
Thanks in advance
Regards,
mike
--
PHP General Mailing
you've got it in the subject line
http://www.php.net/manual/en/function.number-format.php
-Original Message-
From: Michael P. Carel [mailto:mikecarel;teamglac.com]
Sent: Thursday, November 14, 2002 9:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] number format
Hi to all;
Is there any php
number_format() (just add a _ to your subject)
On Thu, 14 Nov 2002, Michael P. Carel wrote:
Hi to all;
Is there any php function that will automatically format the calculated
decimal values in its hundred's,thousand's .places (such as
$423,345,234.50). just like the format() function
I always thought it did it automatically... Have you tried it just normally
yet?
- Original Message -
From: Michael P. Carel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 13, 2002 5:10 PM
Subject: [PHP] number format
Hi to all;
Is there any php function
Or
http://www.php.net/manual/en/function.sprintf.php
or
http://www.php.net/manual/en/function.printf.php
At 04:45 PM 12/20/01 , Bogdan Stancescu [EMAIL PROTECTED] wrote:
if ($i10) { $i=0.$i } ? :-)
phantom [EMAIL PROTECTED] wrote:
I would like to format numbers to be a
Inadvertedly sent to me:
Bas van Rooijen wrote:
sprintf(%02d, $i);
but you should indeed check out how this function works..
phantom wrote:
I would like to format numbers to be a fixed width.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
10 matches
Mail list logo