Why is while loop showing 2 different outputs?
$a=1;
while ($a++ <4) {
echo $a. "<br>";
} // output is 2 3 4 but (4 is not less than 4 )
$a=1;
while (++$a <4) {
echo $a. "<br>";
} // output is 2 3
Please, can someone explain me the difference in detail? in $a++ it is showing output 2 3 4 but 4 is not less than 4 in while condition then why it is showing 4 which is not satisfying the condition?