PHP control statements
We need to control PHP code based upon different condition for example, if the user click on the registration button, then a registration form will show to the users. To control the PHP code we use different types of PHP control statement such as if, else, for loop, break etc. PHP control statement has been broken into three types of category.
- PHP selection statement
- PHP iteration statement
- PHP jump statement
From those statements, using PHP selection statement we can easily select different types of PHP code based upon condition. We can divide the PHP selection statement into two parts
- PHP if statement
- PHP switch statement
- PHP for loop
- PHP while loop
- PHP do-while loop
- PHP break statement
- PHP continue statement
Comments
Post a Comment