1
0
mirror of https://github.com/restoreddev/phpapprentice.git synced 2025-08-04 13:57:40 +02:00

Proofreading edits

This commit is contained in:
Andrew Davis
2018-12-26 19:01:06 -06:00
parent 3e2f24c0c6
commit dc296aef34
2 changed files with 5 additions and 5 deletions

View File

@@ -5,10 +5,10 @@ $a = 1;
$b = 2;
// To add two values, use the plus symbol.
$c = $a + $b;
echo $a + $b;
// To subtract, use the minus symbol.
$c = $b - $a;
echo $b - $a;
// To multiply two values, use an asterisk.
echo $a * $b;
@@ -18,8 +18,8 @@ echo $b / $a;
// PHP uses the percent symbol for calculating the modulus of two numbers.
// The modulus is calculated by dividing two numbers and returning the remainder of the result.
// So, in this example, the value of $modulo will be 0.
$modulo = 10 % 5;
// In this example, the value of $mod will be 0.
$mod = 10 % 5;
// You can also use double asterisks to calculate a number to the power of another number.
// The following statement will print 25.

View File

@@ -19,7 +19,7 @@ $var = 'I am a new variable';
// An int is a number without a decimal place.
// A float is a number with a decimal place.
// A boolean can be two values: true or false.
// Last, there is a string, a collection of characters.
// Last, there is a string: a collection of characters.
$int = 1;
$float = 100.10;
$bool = true;