mirror of
https://github.com/restoreddev/phpapprentice.git
synced 2025-08-04 13:57:40 +02:00
Proofreading edits
This commit is contained in:
@@ -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.
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user