while
loop executes a block of code as long as the specified condition is true. while (condition is true) {
code to be executed;
}
for(initialization; condition; increment){
// Code to be executed
}
foreach
loop works only on arrays, and is used to loop through each key/value pair in an array.