PHP PHP Basics Unit Converter Manipulating Numbers

Eugene Cohen
Eugene Cohen
1,389 Points

PHP "Adding 5 to $integerOne" Adding 5 to $integerOne? var_dump ( $integerOne + 5) ; ???

This is the script I ran but I am prompted that I have not changed the value of $integerOne

index.php
<?php
$integerOne = 1 ;
$integerTwo = 2 ;
$floatOne = 1.5 ;


var_dump ( $integerOne + 5 ) ;



//Place your code below this comment

?>

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 50,905 Points

To change $integerOne you will need an assignment operator:

$integerOne = $integerOne + 5

or

$integerOne += 5