(int)$siz will give you what you are looking for. although with the math
below, you are going to end up with 0.
$siz = 72 / 160;//returns 0.45
echo round($siz); //returns 0
echo (int)$siz; //returns 0
-Original Message-
From: Seb Frost [mailto:[EMAI
- Original Message -
From: "Andrey Hristov" <[EMAIL PROTECTED]>
To: "Seb Frost" <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 6:20 PM
Subject: Re: [PHP] Convert to int...?
> Try
> $a=7.50;
> $a=(int) floor($a);
> var_dump($a)
2 matches
Mail list logo