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 Data & Structure PHP Variables

Why my code is not giving any output?

Are we supposed to have a open a seperate code block and echo name?

index.php
<?php 
$name = "Mike";
echo $name;  
?>  

1 Answer

Hey Vamsi,

Your code looks good. Make sure you're running PHP with web server software. If you just try opening the file in a browser, it won't let you process PHP code. There are a bunch of solutions for you out there: XAMPP, MAMP, LAMP, etc. I find XAMPP to be one of the easiest, but it's up to you. Just make sure whatever you end up using can run PHP.

May be they are on weekend! Is it not strange that we cannot have more than 3 comments! and I had to edit my existing one?

Sorry, I didn't see this was for a challenge haha. Your code is perfect for the challenge. Another person has had trouble with their code today, even though it was perfect like yours. I think the Treehouse servers are just a tad wonky today is all.