6. Ternary - A Special If-Else
Shorthand for an IF statement with exactly one else condition
Returns a value to a variable or function rather than running code
Any single expression can be interchanged for any of the sections
outlined below, including variables, functions, even another ternary
7. Loops
Another core language function that is used repetitively (Ha!)
Types
For
Foreach (remember this one)
While
Loops and arrays were meant for each other
19. Include
Load another PHP file into the current contexts
Executes that code as if it were in the current file
Gives a warning if the file is not found
20. Include_Once
The same as include, except keeps track of if you’re already
included the file and only includes it once
Use but don’t abuse, there is an implicit speed penalty for
doing this
21. Require
Functions the same way as include except gives a fatal error
if the file is not found
Tends to be used for system components vs. small output
snippets
Require_once == include_once