PHP While While syntax while (expression is true) { execute statement } While example <html> <body> <?php $x = 1; while ($x <= 3) { echo "<br />"; echo "x = ", $x++; } ?> </body> </html> Result x = 1...
PHP Switch Switch syntax switch (x) { case x1: if x=x1 then execute statement break; case x2: if x=x2 then execute statement break; case x3: if x=x3 then execute statement break; … default: statement to be executed if x is not...
PHP IF – Else – Elseif Syntax if (condition) { if condition is true then execute statement } if (condition) { if condition is true then execute statement } else { if condition is false then execute statement } if (A)...