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 trialErin Brunken
8,490 PointsWorkspaces printing entire code instead of just "Hello World" p> Instead of just "Hello World" when I run my code?
When I type in my code which is: <?p echo "Hello World"; ?>
Workspaces is returning all the above code back to me when I run the script instead of just the output of "Hello World".
3 Answers
Anusha Singh
Courses Plus Student 22,106 PointsWell while writing php the workspaces, you do not write it like this:
<?p echo "hello world"; ?> this is wrong
<?php echo "hello world"; ?> this is correct
Pranay .
11,430 Pointsi am not sure but shouldn't it be
<?php echo "Hello World"; ?>
instead of
<?p echo "Hello World"; ?>
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsThis is specifically due to a configuration option in php called "short_open_tags"; we explicitly disable it in workspaces, as it's not always supported, and the benefit for developers of making their code portable vastly outweighs the "convenience".