PHP Tutorial PHP Statements
Introduction
- PHP Code Blocks
- PHP Comments
- PHP if
- PHP if else
- PHP switch
- PHP foreach
- PHP while loop
- PHP do while loop
- PHP for loop
- PHP break
- PHP continue
- PHP Mixed-Mode Processing
- PHP include/require
Example
- Break multiple level in PHP
- Break out of a for loop in PHP
- Break out of a while loop in PHP
- Check day of the week in if statement in PHP
- Continue a for loop in PHP
- Cover all cases with if-elseif-else in PHP
- Cover all cases with switch in PHP
- Create three Simple statements in PHP
- Output counter value in for loop in PHP
- Switch with fall through in PHP
- Use continue statement to get ten random numbers,each greater than the next in PHP
- Use do while loop to calculate power in PHP
- Use do while to print day name in PHP
- Use for loop to output html tags in PHP
- Use foreach to loop associative array and get key and value in PHP
- Use if-elseif-else statement in PHP
- Use integer to control a while loop in PHP
- Use single line comments in PHP
- Use switch statement to select one of many blocks of code to be executed in PHP
- Use while to print day namee in PHP
Mix HTML
- Assign values to variable and use them later in the html in PHP
- Mix PHP source code with HTML in PHP
- Mix multiple code blocks in html in PHP
- Mix php code with html code in PHP
- Output data from php code and add style in PHP
- Use shell style comments in PHP
- Use short circuit syntax to output message in PHP
- Use short php tags marker in PHP
- Use the backtick operator in PHP
- Use the silence operator in PHP