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!
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
Any help on displaying this function please?
<?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 ; ?>
Felipe Giovanni de Moura Santos23,702 Points
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.