Date: 08/21/01
- Next message: Jens Schødt: "SV: [PHP] converting str with \n to one line str??"
- Previous message: Michael Rudel: "[PHP] RE: [PHP-WIN] Mutiline read as Sigle Line!"
- In reply to: Andras Kende: "[PHP] begginer how to make integer ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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()
Eg.: $myInt = (integer)round($nonInteger);
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze <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: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jens Schødt: "SV: [PHP] converting str with \n to one line str??"
- Previous message: Michael Rudel: "[PHP] RE: [PHP-WIN] Mutiline read as Sigle Line!"
- In reply to: Andras Kende: "[PHP] begginer how to make integer ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

