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 trialAndrew Dovganyuk
10,633 PointsPlaese help what is wrong in my code???:(
Plaese help what is wrong in my code???:(
<?php
//Place your code below this comment
$integerOne = 1;
$integerOne = $integerOne + 5;
var_dump ($integerOne);
$integerTwo = 2;
$integerTwo = $integerTwo - 1;
var_dump ($integerTwo);
$floatOne = 1.5;
var_dump ($floatOne * $integerOne);
?>
2 Answers
Jennifer Nordell
Treehouse TeacherHi there! You're doing really well here. They do say to display the results of integerOne multiplied by floatOne. What they are expecting here is for you to display the result without displaying the entire information contained in a var_dump
. It's expecting an echo
statement to be used here.
Challenges can be very strict and if you do something it's not expecting, it can cause the challenge to fail even if it's functional. To get this to pass, I removed all your var_dump
lines as they are not required by the challenge. And the line you're missing is an echo statement that looks very much like the code you've already written.
Take a look:
echo $floatOne * $integerOne;
Hope this helps!
edited for correctness
Andrew Dovganyuk
10,633 PointsOh!!!!!!!!! Thanks now its work!!!! You save me!!! Thank you Jennifer!!!;)
Andrew Dovganyuk
10,633 PointsAndrew Dovganyuk
10,633 PointsThank you Jennifer for your respond, but the code echo $floatOne * $integerOne; do nt work to :(
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherDid you remove all the
var_dump
lines in your code?Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherOther than removing the var_dump and adding that echo, I'm not sure what to tell you. This code passes all three steps for me.
You might consider restarting the challenge if you're still experiencing problems.