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

Any help on displaying this function please?

displaying function

index.php
<?php

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

    var_dump($integerOne += 5);
    var_dump($integerTwo -= 1);
    var_dump($integerOne * $floatOne);

     echo ;



?>

2 Answers

Just check what you're displaying.

var_dump() displays really useful information. But it's a lot more than the challenge is asking.

On Task 2 you must just manipulate the values of the variables $IntegerOne and $IntegerTwo. You don't need var_dump() for that (unless you're curious to see what's happening, in that case, go for it, preview, then comment or delete, ).

On Task 3, you must display the product of $IntegerOne and $floatOne.

<?php

// Task 1 - Create the variables and assign the values.
$integerOne = 1;
$integerTwo = 2;
$floatOne = 1.5;

// Task 2 - Add 5 to $integerOne. Subtract 1 from $integerTwo.

$integerOne += 5;
$integerTwo -= 1;

// Task 3 - Multiply $integerOne by $floatOne and display the results.
echo $integerOne*$floatOne;

// You could even do something like this below. (completely unnecessary on this case, but just for you to know).

// $product = $integerOne * $floatOne;
// echo $product;

?>

Thank you for the help.