Join Kevin Skoglund for an in-depth discussion in this video For loops, part of PHP Essential Training.
- [Instructor] In this movie, we'll look at for loops.…For loops are very similar to while loops.…They repeat a section of code until a condition is met.…But the syntax used for doing it is very different.…Why have both then?…Well probably because for loops…are the most classic kind of loop that there is.…They're used in many other programming languages.…Some people prefer the more compact syntax of for loops.…Let's take a look at that syntax now.…A for loop looks very similar at first,…except for the expression part.…Instead of having one expression in parentheses,…we're going to have three separated by semicolons.…
Each one's going to perform a different function.…Expression one is going to be executed the first time only.…It's like an initializing statement before the loop starts.…Expression two is the text expression.…It's going to be checked at the start of each loop,…just like the expression we had in the while loop.…Expression three is going to be executed…at the end of every loop.…Right after the loop finishes,…
- What is PHP?
- Embedding PHP code on a page
- Inserting code comments
- Variables, strings, arrays, and Booleans
- If, else, and elseif statements
- While and for loops
- User-defined functions
- Function arguments and return values
- Debugging and troubleshooting
Skill Level Beginner
MVC Frameworks for Building PHP Web Applicationswith Drew Falkman2h 57m Intermediate
1. PHP Overview
2. First Steps
3. Explore Data Types
4. Control Structures: Logical Expressions
5. Control Structures: Loops
6. User-Defined Functions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.