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 Build a Simple PHP Application Getting Started with PHP Getting Started With PHP

Video and code challenge don't match.

In the code challenge there is a space and a question mark after the word echo, but in the video there is only a space after the word echo and before the quote. I typed exactly what the video said to do into Notepad ++ and then tried to type it back in the code challenge and it didn't work.

2 Answers

that particular code challenge works as such <?php echo "Shirts 4 Mike" ?> php tags may be in the format <?php ?> or <? ?> for short tags. all code goes between the two question marks with at least a space between the ? and the code, but it may be new lines, spaces, or a combination of the two.

Alan Fox
Alan Fox
10,214 Points

On a side note: Some servers require the full <?php and will reject the short rage <? . So its a good idea to always use the full version in case you ever migrate your website to another server.