Impossible bug!
| From: | John Wulff | Date: | Thu, 26 Jun 2003 07:00:53 +0000 |
| Subject: | Impossible bug! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152922@lists.php.net to get a copy of this message | ||
Where the heck is my problem? No matter what the value for *_color is
always 1!!!
$example_data = array(
array("Mar-99",100,2000,5945.33,1234,10),
array("Feb-99",908,3454,47648.90,4321,50),
array("Jan-99",542,8000,13365.52,6012,60)
);
$high = 47648.90;
if(!isset($num))
{
$num = 1;
}
while($num <= 100 && $num >= 1)
{
foreach ($example_data as $key=>$value)
{
list($month, $a, $b, $c, $d, $e) = $value;
$a_percent = ($a / $high) * 100;
if($a_percent > $num) { $a_color = 1; }
$b_percent = ($b / $high) * 100;
if($b_percent > $num) { $b_color = 1; }
$c_percent = ($c / $high) * 100;
if($c_percent > $num) { $c_color = 1; }
$d_percent = ($d / $high) * 100;
if($d_percent > $num) { $d_color = 1; }
$e_percent = ($e / $high) * 100;
if($e_percent > $num) { $e_color = 1; }
}
$num = $num + 1;
}