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 trialMUZ140067 Precious Mutangi
13,064 PointsSTAGE 3 CHALLENGE TASK 1 OF 7
Create Two Integer Variables - The first will be named $integer_one with a value of 1 and the second will be named $integer_two with a value of 2
<?php
//Place your code below this comment
$integer_one ="1"
$integer_two ="2"
?>
6 Answers
Jorge Felico
15,543 PointsRemove the double quotes from the variables, the double quotes make them Strings.
Use the following;
<?php
//Place your code below this comment
$integer_one = 1;
$integer_two = 2;
?>
Daniel Toader
4,574 PointsThere are two problems with your code. First, all statements need to end with a semicolon. Second, when you quote numbers, that assigns them to your variables as Strings rather than integers. Do this instead:
$integer_one = 1;
$integer_two = 2;
Garrett Vance
4,270 PointsBoth of them are wrong! you also need to change the integer variables like this: <?php
//Place your code below this comment $integerOne = 1; $integerTwo = 2; ?>
Sarah-Kate Ryan
6,531 Pointsthis worked for me. thanks!!
Bruce Mawoyo
970 Pointsall these didnt work for me tooo-
shah mahmoodi
618 Points<?php
//Place your code below this comment $integerOne = 1; $integerTwo = 2;
?
Anthony Beltrante
859 Points$integer_One = 1; $integer_Two = 2;
Garrett Vance
4,270 PointsGarrett Vance
4,270 PointsThat didn't work for me