Enter your Sign-on user name and password.

Forgot password?
  • Follow us on:
Loading video...

Start Learning Now

Our free lessons will get you started (Flash® 10 required).
Get immediate access to our entire library.

Sign up for Educator.com

Features Overview

  • Get on-demand access to our complete library
  • Search and jump to exactly what you need to learn
  • Track your progress
  • Download practice and lesson files
  • *Ask questions and get answers from our community & instructors

More Conditional Control Structure

  • The elseif statement is a conditional control structure that can be associated with an if statement. If an if statement’s test condition is FALSE and an associated elseif statement’s test condition is TRUE , the elseif’s statement group gets executed.
  • Multiple elseif statements can be associated with a single if statement.
  • An else statement can be appended to the end of a series of if/elseif statements so if none of the if/elseif test conditions evaluate to TRUE , then the else statement group will be executed.
  • A switch() statement is used to compare a single test expression against different values, known as cases , and then evaluate any code associated with the case it matches.
  • Case values can only be expressions that evaluate to one of the scalar data types (int, float, string, bool) or NULL .
  • A switch() statement executes all statements it encounters after a matching case is found until either a break statement or the end of the switch() statement is reached, whichever occurs first.
  • A default case can be assigned to a switch() whose associated statement(s) will be executed if the test expression did not match any case in the switch().
  • Additional Resources:

More Conditional Control Structure

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

Computer Science: Introduction to PHP