[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-db
Subject:    [PHP-DB] Re: Decimal places.
From:       203.79.103.32
Date:       2002-10-30 9:52:19
[Download RAW message or body]

In article <118DC586DF4FD311948800A0247C044D02775821@NTSVR1>, 
will@netwaynetworks.com.au says...
> 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 around it is if i piped the above statement into
> another varible and set that variable to an integer then printed that. 
> 
> I dont really want to do this as i will end up with 50 extra variables.
> Thanks in advance for your comments. 

number_format() might help you :-{

Cheers
-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic