Turn Your Vehicle Into a Smart Earning Asset

While you’re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

πŸš— You set the rental price
πŸ” Secure bookings with verified renters
πŸ“ Track your vehicle with GPS integration
πŸ’° Start earning within 48 hours

Join as a Partner Today

It’s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

While, Nested While, Do While, and Nested Do While Loop in PHP.

While Loop

The While loop keeps repeating an action until an association condition returns False. It means that when a while loop started, it checks the condition, if it’s true then it executes the block of statements and then rechecks the condition and executes until the condition gets False.

Syntax

initialisation;
while(condition)
{
block of statement;
increment/decrement;
}

Sample Program

Output

Sample program-2

Output

Nested While Loop

When we insert a while loop under a while loop then, it is called Nested While Loop.

Syntax

Sample Program

Output

Do While Loop

The Do-While Loop is similar to while Loop, but the condition is checked after the loop body is executed. This ensures that the loop body is run at least once.

Syntax

initialisation
do
{
block of statements;
increment/decrement;
}while(condition);

Sample Program

Output

Nested Do While Loop

When we insert a Do-while loop under a Do-while loop then, it is called Nested-Do-While loop.

Syntax

initialisation
do
{
block of statements;
increment/decrement;
do
{
block of statements;
increment/decrement;
}while(condition);
}while(condition);

Sample Program

Output

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.