PHP Control Structures Tutorial #2 foreach loops

preview_player
Показать описание
In this How To Code Well PHP video tutorial you will learn how to use the PHP foreach loops to iterate over a PHP array.

I use a real world example of a E commerce shopping cart that has a orders array. This array contains keys which make up the order title and its values are the items costs.
We loop over the orders array outputting each order item and its costs as well as calculate a running total of the order items.

The PHP tutorial I will demonstrate

How to use foreach loops
How to access the key and values of each array item
How to run a calculation based on the array values

Get the full course with no adverts at skillshare with 2 months free:

PHP Books:

PHP Hosting from Cloudways:

----------------------------------------------------------------
How To Code Well YouTube Channel:

This is a programming tutorial/web chat from the How To Code Well series.

To find out more about this series and to view other videos click here:

Other links web development chats and tutorials

MYSQL Console Tutorial #1 Basics

What Defines a Great Web Developer

Why Deploying Websites Via FTP Is BAD

Docker Machine Tutorials

PHP Tutorials

MYSQL Tutorials

======== MY COURSES AND BOOKS ========

======== SUPPORT THE CHANNEL ========

======== SUBSCRIBE TO THE NEWSLETTER ========

======== FOLLOW ME ========

======== MY TALKS ========

======== RECOMMENDED PROGRAMMING RESOURCES ========

#php #phpprogramming #howToCodeWell ## Become a channel member
Join the How to code well YouTube channel to get access to premium programming courses, tutorials and member perks
Рекомендации по теме
Комментарии
Автор

Clear tuts. Be good to include a bit more real world uses to the code. Like where would that array come from? A book order? But then it would come from a database wouldn't it?

rw
visit shbcf.ru