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 trialDelia Morales
4,805 Pointswhy is this wrong <
i do not know what they want in the blank
2 Answers
Connor Walker
17,985 PointsThe reason you are getting the answer wrong is because they want 10 to be echoed out as well as the other numbers. By using the less than operator the largest number that will be printed is 9 because 10 is not less than 10. By using this less than or equal to operator (<=), 10 will also be printed to the screen and the task will pass because 10 is less than or equal to 10
$i = 1;
while($i <= 10) {
echo $i;
$i++;
}
Delia Morales
4,805 Pointsthank you connor