Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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;