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

Michael Bragg
Michael Bragg
811 Points

I have tried var_dump, and echo to get the results and I'm wondering if I'm supposed to used the previous task here?

I have multiplied $integerOne by $floatOne and attempted echo, and var_dump to get the solution, but I get less/more than five if I un-comment, or re-comment the += 5 in the previous task. Any help would be greatly appreciated.

index.php
<?php

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

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

$integerOne *= $floatOne;
var_dump ($integerOne);

?>

1 Answer

Hello!

Instead of reassign the $integerOne value, just try something like

echo $a * $b;

It seems it's the expected behaviour