Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Algoritma & Pemrograman 1 Achmad Fitro The Power of PowerPoint – thepopp.com Chapter 4.

Presentasi serupa


Presentasi berjudul: "Algoritma & Pemrograman 1 Achmad Fitro The Power of PowerPoint – thepopp.com Chapter 4."— Transcript presentasi:

1 Algoritma & Pemrograman 1 Achmad Fitro The Power of PowerPoint – thepopp.com Chapter 4

2 PHP Loop 2 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 In PHP we have the following conditional statements: 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

3 While Loop while (condition is true) { code to be executed; } 3

4 Do while Loop do { code to be executed; } while (condition is true); 4

5 For Loop for (init counter; test counter; increment counter) { code to be executed; } 5

6 foreach Loop foreach ($array as $value) { code to be executed; } 6

7 Thank You for Watching! Any Questions?


Download ppt "Algoritma & Pemrograman 1 Achmad Fitro The Power of PowerPoint – thepopp.com Chapter 4."

Presentasi serupa


Iklan oleh Google