php files |
How they work |
Escape |
escape slash stops php from proceeding with the operation. For example if you have a variable $cat that's filled with "the cat goes meow", with a back \ next to the variable, it'll just show $cat when you print it. |
math |
The math arithmetic operators allow you to multiply, add, subtract, divide, use exponent, and even use the modulus where it prints out the numerator.
You can use it through echos and prints with numbers or variables that contains any number |
quotes |
double quotes (these little guys --> " ) allows you to print the value of a variable within a echo/print while single quotes (these guys --> ') allows you to print out the variable name without printing the value. |
constant |
when creating a constant, make sure you always capitalize the constant name so you can tell them apart from variables, it's also a practice that you should learn to do everyrtime
you create a constant. Constants are different from variable because you can NOT override a constant NO MATTER WHAT. If the name is used in a constant already
having another constant with the same name will give you an error letting you know that it is already used in a different constant. |
predefined |
predefined variables are variables that are already defined within php meaning that they already have value where you can just print them out like the phpinfo c: |
conditions |
conditions are statements within the coding language. It compares a variable with a specifc conditon to see if it's true.
For example, if x = 20, and if we compare x to 30 to see if it is the same... and if it's not the same, it prints out
a statement or breaks depending on what you choose to write for the output. |
functions |
Functions in the most easiest way to explain, is its a formula. It's a block of code that you can keep on using continuously throughout your
program. They can either be user functions that user like us can make
in our program. There are also built in functions that you can use as well like the strlen() function. |