I have a simple php code :
<?php
$page = 2;
$max = $page * 10 + 1;
$min = $page - 11;
$counter = 1;
if($counter > $min && $counter < $max) // so, it will be if(1 > 9 && 1 < 20)
{
echo "true!";
}
else
{
echo "false!";
}
?>
If I run this code, It always echo true. However, If I change the assign like this :
$max = 21;
$min = 9;
The code work fine and echo false. Where did I wrong?
Edit : The code work fine if value of counter >= 9 :(
P/S : sorry for bad English.