Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP Basics Unit Converter Manipulating Numbers

yahav rosner
yahav rosner
4,304 Points

i am confused someone can help me with my code?

please help me

index.php
<?php
$integerOne = $integerOne + 1;
var_dump($integerOne);
$integerOne++;
 $integerTwo = $integerTwo + 2;
var_dump($integerTwo);
--$integerTwo;
$floatOne = 1.5;




//Place your code below this comment

?>

1 Answer

Wilco Verhaar
Wilco Verhaar
3,543 Points

Work step by step. Don't change the code from the last task. Also don't put any extra code (like var_dumps). It will give errors because it wont have the expected output. Take a look at this, step by step code of your challenge.

<?php

//Place your code below this comment
$integerOne = 1;
$integerTwo = 2;
$floatOne = 1.5;

// Add 5 to $integerOne. Subtract 1 from $integerTwo.
$integerOne = $integerOne + 5;
$integerTwo = $integerTwo - 1;

// Multiply $integerOne by $floatOne and display the results.
echo $integerOne * $floatOne;
?>