A Php program to print the number using while loop. In this program we can print the number by using looping statement. PHP will execute the nested statement twice as long as the while expression evaluates to true. If the while expression evaluates to false from the start, the nested statement will not be executed.
$x = 95;
while($x <= 100)
echo "$x <br>";
What is while loop in php language
What is increment operator in php
The ++ and — increment and decrement operators, which are used in C, are also defined in PHP. The increment operator, as its name suggests, increases the value of the operand variable by one. The Decrement operator subtracts one from the value. Both are unary operators, which means they only require one operand.
Difference between in i++ and ++i in php language
++ is the difference. I will update the value of the I variable and return it, whereas $i++ will return the original value, so increment it. The term “post-increment” refers to the use of $i++. After assigning the original value of I to $j, it increments the value of $i. Pre-increment is the symbol I