From dc296aef34816787fdf779a7daefbc8a5ddb5371 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 26 Dec 2018 19:01:06 -0600 Subject: [PATCH] Proofreading edits --- code/arithmetic.php | 8 ++++---- code/variables.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/arithmetic.php b/code/arithmetic.php index d770ca7..57fb4da 100644 --- a/code/arithmetic.php +++ b/code/arithmetic.php @@ -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. diff --git a/code/variables.php b/code/variables.php index 13c2f8d..53c8a9c 100644 --- a/code/variables.php +++ b/code/variables.php @@ -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;