Re: Warning: Division by zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The error I am getting is when I am defining a variable.
> (line 15) $percent_difference=($assess_difference)/($assess_value);
> Does this make a difference?

No, it doesn't make a difference.  The simple fact is that
$assess_value is either undefined or has been set to 0 at some point.
For it's use in the above equation, neither case is valid.
Consequently, you really should be doing some validation at some point
prior to that line.

thnx,
Christoph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux