Hello,

I tried using the ceil() and floor() functions.  They did not help much.
Ceil() set everything to 1%.  I tried this:

$percent = $num_games/$total_games;
$percent = round($percent, 1);

But again, some of the percentages are:
0.7%

I also tried assigning the $percent variable the int type, but that didn't
work.  Here's an example from doing that:
0.67142857142857%

Any other ideas?

Thank you!!!
Tyler
----- Original Message -----
From: "slavko dervisevic" <[EMAIL PROTECTED]>
To: "Matt Greer" <[EMAIL PROTECTED]>
Cc: "PHP-General" <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 4:58 PM
Subject: Re[2]: [PHP] percentage problems


> Hello matt,
> even better is ceil() or floor()
> Saturday, September 22, 2001, 11:53:44 PM, you wrote:
> >> Better than substr is to cast the variable to be an int
>
>
> --
> Best regards,
>  slavko                            mailto:[EMAIL PROTECTED]
>
>
>
>
>
> --
> 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]


-- 
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