diff --git a/guide/english/php/loops/index.md b/guide/english/php/loops/index.md index 9eed9a3206..0b73bbfbf4 100644 --- a/guide/english/php/loops/index.md +++ b/guide/english/php/loops/index.md @@ -12,6 +12,18 @@ A loop will continue running until the defined condition returns `false`. You can type `php for` , `php while` or `php do while` to get more info on any of these. + +## PHP Loops +Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal code-lines in a script, we can use loops to perform a task like this. + +In PHP, we have the following looping statements: + +while - loops through a block of code as long as the specified condition is true +do...while - loops through a block of code once, and then repeats the loop as long as the specified condition is true +for - loops through a block of code a specified number of times +foreach - loops through a block of code for each element in an array + + ### More Information - PHP.net - For Loops