Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

PHP Arrays and Control Structures Course (How To)

via Treehouse

Overview

This course builds on the foundational skills covered in the PHP Basics course. We'll explore conditionals, loops and the compound variable -- arrays. All of which help your write more powerful and intelligent programs using less code.

What you'll learn

  • Logical Operators
  • Conditionals
  • Arrays
  • Loops

Syllabus

PHP Conditionals

Let's dive into conditional, and logical operators as we explore the different options available for expressing conditional statements in PHP. We'll wrap up this first section by creating a script for sending customized messages to high school students at the end of the school year.

Chevron 11 steps
  • Introduction

    2:54

  • Comparison Operators

    6:35

  • Compare

    5 questions

  • Negation Operator

    7:43

  • Nested Conditional Statements

    3:50

  • Conditionals

    5 questions

  • Logical Operators

    6:39

  • Operators

    1 objective

  • Switch Case Statements

    4:28

  • School's Out

    7:07

  • Switch Statements

    2 objectives

PHP Arrays

Let's dissect the compound variable type of arrays. This will allow us to store more complex data, such as lists and dictionaries, then manipulate that data in fun and interesting ways. In this section we'll be starting a todo app by storing details about each task including due date and priority.

Chevron 13 steps
  • Indexed Arrays

    5:13

  • Adding Array Elements

    5:08

  • List Quiz

    5 questions

  • Removing Array Elements

    4:50

  • Editing Array Elements

    1:36

  • Modifying Arrays

    3 objectives

  • Associative Arrays

    3:48

  • Associative Quiz

    5 questions

  • Mixing Data Types in Arrays

    6:07

  • Multidimensional Arrays

    6:14

  • Multidimensional Arrays

    3 objectives

  • Sorting Arrays

    6:16

  • Mixing and Sorting

    5 questions

PHP Loops

Explore the different loops available for managing the flow of code in PHP. Loops are a way of repeating code and are very handy for repetitive tasks. We'll use these looping options to complete our todo app as well as create a ping pong game in which we'll examine different use cases for loops.

Chevron 12 steps
  • Do While Looping

    6:23

  • While Listing Array Values

    3:50

  • While Quizzing

    5 questions

  • Ping Pong

    7:32

  • For Loops

    5:51

  • For Looping

    2 objectives

  • Foreach Loops

    7:23

  • Quiz FOR Loops

    5 questions

  • Todo App

    10:17

  • Sorting Multidimensional Arrays

    6:50

  • Continuing Your Journey

    1:38

  • Looping with PHP

    3 objectives

Reviews

Start your review of PHP Arrays and Control Structures Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.