CodeAcademy PHP

In this assignment, we were to demonstrate that we completed the CodeAcademy PHP Tutorial. The Codeacademy tutorial took us through a series of exercises where we were understand and create if/else, switch statements, practice utilizing arrays in PHP, conducting While and Do-While loops and Object-Oriented Programming, parts 1 and 2. Below are screenshots of the exercises that were completed.


Example of If Statement - An if statement is made up of the if keyword, a condition like we've seen before, and a pair of curly braces { }. If the answer to the condition is yes, the code inside the curly braces will run

My Pic

Example of If/Else Statement Combined - If your condition is true, the program will run. If it is not true the program will run false.

My Pic

Example of While Loop - a while loop can be used to repeat a set of commands an unknown number of times.

My Pic