Math operators function the same in PHP as in typical math. You can use but are not limited to, addition, subtraction, multiplication, division, pre and post increments and decrements and modulus (remainder of devision). You must set your numbers as variables, but without the quotes. For example $num = #
Addition: We have 1 dog. If we got another, we would have 2.
Subtraction: We also have 4 cats. If one ran away we would have 3 cats.
Multiplication: We are fortunate that is only 1 additional pet.
Division: If we had two cats run away, we would have 2 cats left.
This is an example of modulus: dividing 4 by 3 to equal 1.
This is a pre increment of 4. Here 4 becomes 5.
This is a post increment of 5. Here 5 becomes 5 plus one after this string. Now that variable is no longer 5, it has become 6.
This is the opposite, a pre decrement. That means that 6 becomes 5.
This is a post decrement. It follows the opposite logic as a post increment. After concatenation
and completion of this string, the decrease will be noted by the variable 5.
Now when I type that variable, it is 4.