filmov
tv
PHP do while Loop | PHP Loops - PHP Tutorial 48

Показать описание
Notes for You:: PHP do while Loop | PHP Loops - PHP Tutorial 48
- is a Exit control loop.
- PHP engine executes the statements in a do while loop at least once; and then repeatedly executes the statements in a do while loop as long as the given conditional expression evaluates to true.
Syntax of PHP do while loop:
initialization;
do
{
statement(s);
increment/decrement;
} while(conditional expression); // Condition is checked at the end of the loop
Note:
- There is no alternative syntax for do-while loop.
Example for PHP do while loop:
$i=1;
do{
echo("Hello World <br/>");
$i++;
}while($i<=5);
Note:
- replace < with less-than symbol.
- replace > with greater-than symbol.
Note:
- When you want to execute some set of statements at least once, then use do while loop.
=========================================
Follow the link for next video:
PHP Tutorial 49 - foreach Loop in PHP | PHP foreach Loop Tutorial
Follow the link for previous video:
PHP Tutorial 47 - When to use while loop in PHP
=========================================
PHP Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
MySQL Tutorials Playlist:-
HTML Tutorials Playlist:-
CSS Tutorials Playlist:-
JavaScript Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #PHP #PHPTutorial
- is a Exit control loop.
- PHP engine executes the statements in a do while loop at least once; and then repeatedly executes the statements in a do while loop as long as the given conditional expression evaluates to true.
Syntax of PHP do while loop:
initialization;
do
{
statement(s);
increment/decrement;
} while(conditional expression); // Condition is checked at the end of the loop
Note:
- There is no alternative syntax for do-while loop.
Example for PHP do while loop:
$i=1;
do{
echo("Hello World <br/>");
$i++;
}while($i<=5);
Note:
- replace < with less-than symbol.
- replace > with greater-than symbol.
Note:
- When you want to execute some set of statements at least once, then use do while loop.
=========================================
Follow the link for next video:
PHP Tutorial 49 - foreach Loop in PHP | PHP foreach Loop Tutorial
Follow the link for previous video:
PHP Tutorial 47 - When to use while loop in PHP
=========================================
PHP Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
MySQL Tutorials Playlist:-
HTML Tutorials Playlist:-
CSS Tutorials Playlist:-
JavaScript Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #PHP #PHPTutorial