
Testing Lesson
Presentation
•
Computers
•
9th Grade
•
Practice Problem
•
Hard
Julie Rhoades
Used 2+ times
FREE Resource
8 Slides • 0 Questions
1
M2 L1 PHP
2
Overview
Use conditional statements
if
if...else
switch
Nested statements
2
3
if Statements
Syntax for a simple if statement is:
if (conditional expression)
statement;
If more than 1 statement, they must be in
a block { }
Recommendation: Always include { } to
cut down on errors
3
Indent
for readability
and less errors
4
if Statements, Example
$ExampleVar = 5;
if ($ExampleVar == 5) {
echo "<p>Evaluated to true.</p>";
echo "<p>So these lines print.</p>”;
}
echo "<p>This statement always executes.</p>";
4
Opening and Closing braces.
Needed for a command block
5
if...else Statements
Syntax:
if (conditional expression)
statement;
else
statement;
Example:
$Today = "Tuesday";
if ($Today == "Monday") {
echo "<p>Today is Monday</p>";
}
Else {
echo "<p>Today is not Monday</p>";
}
5
6
Nested Statements
One decision-making statement is
contained within another
$SalesTotal = 60;
if ($SalesTotal > 50){
if ($SalesTotal < 100){
echo "<p>Sales between 50 & 100.</p>";
}
}
6
7
switch Statements
$AmericanCity = "Chicago";
switch ($AmericanCity) {
case "Miami":
Echo "Florida";
break;
case "Chicago":
Echo "Illinois";
break;
case "Los Angeles":
Echo "California";
break;
default:
Echo "United States";
}
7
Break command ends a switch
statement. Needed because
the switch statement does not
automatically stop after a case
match.
Expression
Case Label and value
Default – if no
match above
8
Summary
Use conditional statements
if
if...else
switch
Nested statements
8
M2 L1 PHP
Show answer
Auto Play
Slide 1 / 8
SLIDE
Similar Resources on Wayground
8 questions
Semicolons
Presentation
•
10th Grade
7 questions
Ice Breaker: What would it be, what would you be?
Presentation
•
10th Grade
7 questions
Dasar Dasar Komputer
Presentation
•
10th Grade
6 questions
English H 9/29
Presentation
•
9th Grade
8 questions
Some British Slang
Presentation
•
9th Grade
8 questions
HTTP and its History
Presentation
•
9th Grade
5 questions
открытый урок
Presentation
•
9th Grade
7 questions
Evolution Quiz most missed
Presentation
•
9th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade