PHP Warning: Division by zero in ~/public_html/forums/cn/template/wind/thread.htm on line 14

[04-Sep-2010 13:46:24] PHP Warning:  Division by zero in ~/public_html/forums/cn/template/wind/thread.htm on line 14

I’ve received this bug. Just make sure the value is not equal to zero, then it won’t be divided by it.

<!--
EOT;
$tmpCount=0;
$idp = 100/$db_txtadnum;
foreach ($arrayAdvert as $value) {

if ($tmpCount==0) {print <<<EOT
-->

change to.

<!--

EOT;
$tmpCount=0;
if ($db_txtadnum != 0) {
$idp = 100/$db_txtadnum;
}
foreach ($arrayAdvert as $value) {
if ($tmpCount==0) {print <<<EOT
-->


Justin Soo is a self-employed Web Development Consultant Specializing, Social Media Content Strategist, Professional Blogger and Computer Engineer. He previous experience in Web Development, Programming, Linux System, MySQL Database. G+ F T In

Tagged with: ,