PHP – as Keyword
The PHP as keyword is used by the foreach loop to establish which variables contain the key and value of an element.
The PHP as keyword is used by the foreach loop to establish which variables contain the key and value of an element.
The PHP break keyword is used to break out of for loops, foreach loops, while loops, do… while loops, and switch conditions.
The PHP continue keyword is used to is used to end the current iteration in a for, foreach, while or do…while loop, and continues to the next iteration.
The PHP do keyword creates a loop which always runs at least once. It is used together with the while keyword to create a do…while loop.
The PHP endfor keyword is used to close the code block of a for loop which was started using the for syntax.
The PHP endforeach keyword is used to close the code block of a foreach loop which was started using the foreach syntax.
The PHP for keyword is used to create a for loop, which loops through a block of code a specified number of times.
The PHP foreach keyword is used to create foreach loops, which loops through a block of code for each element in an array.
The PHP while keyword is used to create a while loop and is also used to set the looping condition of a do…while.