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 (Retired) PHP Datatypes PHP Datatypes Challenge

STAGE 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

index.php
<?php

//Place your code below this comment
$integer_one ="1"
  $integer_two ="2"

?>

6 Answers

Remove 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;

?>

That didn't work for me

There 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;

Both 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; ?>

this worked for me. thanks!!

all these didnt work for me tooo-

shah mahmoodi
shah mahmoodi
618 Points

<?php

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

?

Anthony Beltrante
Anthony Beltrante
859 Points

$integer_One = 1; $integer_Two = 2;