Learn how to create your first PHP file and run it, and also take a look at some details about your PHP installation.
Commenting code is important when writing code. Here we look at how to comment in several different ways.
Learn PHP: Outputting
Output content to a page.
Using the heredoc syntax, outputting large chunks of complex content becomes easier.
Learn how to create variables to store values of different datatypes.
Understanding variable scope in PHP.
Understanding what NULL is, and how to check for it and tell the difference between other false values.
Use IF statements to run a block of code based on an expression evaluating to true or false. We also look at IF ELSE statements.
Switching is similar to a large IF statement chain, but is presented in a different way.
The ternery operator allows for short, inline IF statements to be performed and can tidy up your code and save time.
Logical operators allow you to check more complex expressions where a true or false value is required.
Comparison operators allow you to compare values.
Perform arithmetic operations with these operators.
Arrays are maps of information that can hold different data types and are widely used as a form of collecting and holding data.
Multidimensional arrays are simply arrays that hold other arrays, creating multiple dimensions.
Foreach is typically used to iterate over arrays. Here we look at creating a looping over a basic array, and outputting the values.
A for loop is a loop that allows setting a value once, checking this value on each loop, and incrementing or decrementing the counter.
We look at while and do while loops and the difference between them.
Creating and using basic functions.
Anonymous functions (or ‘closures’) are functions with no defined name.
Using anonymous functions for callbacks.
How to include or require files within other files, and why this is useful. We also look at include_once and require_once.
Sending form data along with an HTTP request, and the different between POST and GET, and when they should be used.