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
Jason Larkin
13,970 PointsPHP Basics Echo Variables
I'm having trouble with PHP Basics variables- echo. I have tried it in one code block and two code blocks and it won't let it pass. Can anyone please help?
<?php $name = "Mike"; echo $name; ?>
5 Answers
jeff creamer
23,733 PointsYeah, something's weird. Not working for me in 2 different browsers, even when c+p-ing in the above answer that worked for some.
Edited to add: -bizarre; it worked like the 10th time using the same code I used all along after I refreshed the browser, restarting the code challenge.
Adam N
70,280 PointsI pasted your code in and it worked just fine.
Jason Larkin
13,970 PointsWhy doesn't it work for me?
Chris Collier
17,774 PointsIs your file saved with a .php extension?
Jason Larkin
13,970 PointsIt is in index.php, so yes I think so.
gerardo barroso
42,674 PointsIt works
Are you running your code in a server like xamp/wamp?
Jason Larkin
13,970 PointsThanks Gerardo; I just had too many programs running for Chrome's liking. Once I shut down Facebook and Pandora it worked.