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 trialDave Lowther
Courses Plus Student 20,797 PointsCan't pass PHP challange to echo 2nd value from array.
I've tried changing the number in my echo command, rotated through 0, 1, 2 to no effect.
<?php
//Place your code below this comment
$integer_one = 1;
$integer_two = 2;
$golden = 1.618;
$bool = true;
var_dump($bool);
$colors = array("red", "blue", "green");
echo $colors[1];
?>
2 Answers
Alex Heil
53,547 Pointshey David Lowther , actually you're code is absolutely fine ;) however you have a var_dump statement in your code that wasn't asked for in the challenges and that's somehow confusing the checker. if you take that line out (I just re-tested it in the challenge) your code will pass just fine.
hope that helps and have a nice day ;)
Dave Lowther
Courses Plus Student 20,797 PointsThank you Alex!
Alex Heil
53,547 Pointsyou're welcome david, great to hear this helped you out ;)