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 trialKnowledgeWoods Consulting
5,607 PointsWhy was PHP tag Closed after the $_GET?
When we were checking if the $_GET["STATUS"]=="Thanks" then why was php tag closed just after the opening curly braces?
2 Answers
Patrick Gerrits
14,614 PointsProbably to render HTML.
If you want to show PHP in HTML it is easier to do this in plain HTML tgen rather do it with echo "<HTML>";
So when you want to combine HTML with PHP, you sometimes close the PHP tag after a function or method. TO then redner some html and when that is done open the PHP tag again to continue PHP.
Matt Campbell
9,767 PointsNo you can't. There's no curly braces in HTML are there?
Patrick Gerrits
14,614 PointsHe is asking why the php tag was closed just after the { from the PHP. He is not asking for usage for {} in HTML
KnowledgeWoods Consulting
5,607 PointsKnowledgeWoods Consulting
5,607 PointsCan i close the PHP tag before the curly braces...Will it effect my code?
Patrick Gerrits
14,614 PointsPatrick Gerrits
14,614 PointsNo You cant. You first need to use the { or } and then use close the PHP