On Tue, Aug 21, 2001 at 02:08:06AM -0700, Andras Kende wrote:
> Hello,
>  
>  I have a query but it not creating integer result:
>  
>  $saleprice=$amyrow["saleprice"]+$saleprice;
> $squarefeet=$amyrow["squarefeet"]+$squarefeet; 
>  $dom=$amyrow["dom"]+$dom; 
>   result:
> Total listings: 18 -- Average Price: $339166.66666667
> Average Square Foot: 1596.6111111111
> Average DOM: 52.555555555556
> Average Price Per Square Feet: 212.42910330909
>  
> But I need Integer numbers like 339166 , 1596 ....
> 
> Thanks :)
>  
> Andras


Try: round()

http://www.php.net/round

Eg.: $myInt = (integer)round($nonInteger);

-- 

* R&zE:


-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to