RE: [PHP-WIN] Finding a percentage
| From: | Luis Moreira | Date: | Wed, 31 May 2006 08:09:51 +0000 |
| Subject: | RE: [PHP-WIN] Finding a percentage | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-26939@lists.php.net to get a copy of this message | ||
This is not exactly a PHP issue, it is straight math !!!
Percent = value / (max - min)
-----Original Message-----
From: Daniel Anderson [mailto:shadowedmyth@hotmail.com]
Sent: terça-feira, 30 de Maio de 2006 23:11
To: php-windows@lists.php.net
Subject: [PHP-WIN] Finding a percentage
Hi,
Does anyone know how to find the progress percentage (%) between one number
to the next?
For example:
I have a minimal number of 0
I have a maximum number of 77
I have a current number of 9
Does anyone know how I may find the percentage of this number from the
minimal number, to the maximum number?
EXAMPLE:
The Mininimum Number is 0, the Maximum Number is 50, the Current Number is
25. This would mean the percentage of this would be 50%. It's that
"progress" output I'm looking to obtaining.
Unfortunately I cannot work with whole multiples of ten (10, 50, 100), I am
limited to erratic number placements.
This is very urgent, please, does anyone know a solution?
Many thanks!
Dan