Saturday, 10 August 2013

Division by zero error?

Division by zero error?

If I get a division by zero, how can I catch it and just echo an error or
something of that nature?
Here's the line of code in question:
$percent = round(100.0*($row['p2']/$row['p1']-1));

No comments:

Post a Comment