Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Division by zero

i keep getting this error :
Division by zero (E_WARNING) /var/www/html/Panel/five/wPAIANY/page/data.inc.php (86 line)


My code still works , i just want to know how i can fix this
Quote:A division by zero error can occur in PHP whenever:

The variable you’re dividing with has been set to zero (this number is called the divisor).
The variable you’re dividing with has been set to null.
The variable does not exist. i.e. It has not been set.

I can't really help without seeing the code, but it is probably due to one of the above reasons.

In general, you can use an if statement to not let your code run until a variable has been set, maybe this can help you:

Code
if(isset($yourVariableCausingProblems)) {
        // Your Code
}

or even this:

Code
if($yourVariableCausingProblems > 0) {
        // Your Code
}
[Image: K2c6AfR.png]
(Aug 10, 2018 10:35 AM)Don Vito Corleone Wrote:  I can't really help without seeing the code, but it is probably due to one of the above reasons.

In general, you can use an if statement to not let your code run until a variable has been set, maybe this can help you:

Code
if(isset($yourVariableCausingProblems)) {
       // Your Code
}

or even this:

Code
if($yourVariableCausingProblems > 0) {
       // Your Code
}

heres all my code:

https://pastebin.com/2yHvr4LF
(Aug 10, 2018 03:15 PM)Truth3356 Wrote:  heres all my code:

https://pastebin.com/2yHvr4LF
Good job.

https://prnt.sc/kh85d8
Je t'aime
[Image: fpZ5a5g.png]
(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
With pastebin first of all make sure it's public so everybody can see it.

Secondly use these tags in your post here so it can embed the code into your post!

Quote:[paste]link here[/paste]
Nowadays? I'm just here for the nostalgia.