Concept

How are for loops structured in PHP?

ComputerScienceOne / For Loops

"For loops in PHP use the familiar syntax of placing the initialization, continuation condition, and iteration on the same line as the for keyword. An example can be found in Code Sample 39.3. Semicolons are placed at the end of the initialization and continuation condition, but not the iteration statement. With while loops, the opening curly bracket is placed on the same line as the for keyword. Code within the loop body is indented, all at the same indentation level."

Related Ideas

How are for loops structured in PHP? | ComputerScienceOne | Bifalgorithm | Bifalgorithm