Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

PHP For Loops and PHP While Loops

4.2K views on YouTube

Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

This tutorial will teach you how to code PHP for loops and PHP while loops. You will learn the difference between for loops and while loops and how PHP applies each type of loop along with conditional statements.

Subscribe ➜ https://bit.ly/3nGHmNn

PHP is a backend development language that runs on a server. I suggest installing the XAMPP development server. Here is my guide to getting XAMPP set up: https://youtu.be/btauAEqaifw

Install XAMPP ➜ https://www.apachefriends.org/

📺 This tutorial is part of my PHP and MySQL for Beginners Playlist: https://www.youtube.com/playlist?list=PL0Zuz27SZ-6MeRUt-z60DRxNqcrFAUYIb

(0:00) Intro
(0:26) Start Apache in the XAMPP control panel
(1:16) Adding PHP to your page
(1:35) Create a PHP while loop
(3:00) Create a PHP for loop
(5:55) Loop through PHP array values with a while loop
(8:11) Loop through PHP array values with a for loop

📺 Learn Web Dev at these sites:
https://www.freecodecamp.org
https://www.theodinproject.com

✅ Follow Me:
Twitter: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
Hashnode: https://yesdavidgray.hashnode.dev/
Reddit: https://www.reddit.com/user/DaveOnEleven

Was this tutorial about PHP for loops and PHP while loops helpful? If so, please share. Let me know your thoughts in the comments.

#php #for #loops