I have an Integer/String variable. If I have an error in mysqli statement it becomes String and without errors it becomes number of affected rows (Integer).
But in PHP if we have something like this:
$i = 0;
if ( $i < 0 || $i == null ) {
var_dump($i);
}
We have this result:
int 0
First, I want to know why this happens? (I mean, if var_dump is int 0, why the if statement doesn't work?)
Second, I want the solution for my comparison.
0is considered empty (NULL)=== null