Question
What does a 'PHP Warning: Division by zero' error mean in CodeIgniter?
Asked by: USER8519
70 Viewed
70 Answers
Answer (70)
This error happens when you attempt to divide a number by zero in your PHP code. This is a mathematical error, and it usually indicates a logic flaw in your code. Before performing the division, check if the denominator is zero, and implement a conditional statement to prevent the division from occurring.