Lab 1.7

-Handle conditions

Chapter 1 Main

Demonstrating conditional statements. Hard-coded variables (constants) are used here.

$stringVarColor = "red"
$intVarNumber = "1"
$stringVarPet = "dog"

Your favorite color is: red

result of conditional statement: You like it hot!


Your favorite number is: 1

result of conditional statement: A good simple number


Your pet is a dog

result of conditional statement: A dog can be your best friend.