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 trialJerett Patterson
323 PointsBreaks not taking with my code - seems to identical
here is my code:
<?php
$name = $_POST["name"]; $email = $_POST["email"]; $message = $_POST["message"]; echo "Name: " . $name . "\n"; echo "Email: " . $email . "\n"; echo "Message: " . $message;
?>
2 Answers
eck
43,038 PointsI think what you want here might be the br tag for line breaks. try replacing the "\n" with "<br>"
Jeff Busch
19,287 PointsHi Jerett,
I agree with Erik. I've always had a problem with "\n".
<?php
echo "<br>";
?>
Is a better way to go, in my opinion. Also, while I have your attention:
If you look to the bottom right of the text box you will see something that says Markdown Cheetsheet. Also, there is a post here titled: Posting Code to the Forum by Dave McFarland. If you don't understand that maybe this will make sense: How to display code at Treehouse.
Jeff