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 trialEoghan Uttley
1,076 Points100% sure I'm filling this in correctly..what gives
.
<?php
$name = "Mike";
?>
<html>
<head>
<title><?php echo $name ?> | Treehouse Profile</title>
</head>
</html>
Eoghan Uttley
1,076 PointsDeclare variable called name with value of Mike, echo $name to screen.
Liam Linacre
Courses Plus Student 386 PointsJust ran through the challenge, i think Holger Liesegang is correct
2 Answers
Holger Liesegang
50,595 PointsHi Eoghan Uttley !
You might just want to add the echo statement under the variable declaration like this and you can pass the challenge:
<?php
$name = "Mike";
echo($name);
?>
Eoghan Uttley
1,076 PointsTa mate
Holger Liesegang
50,595 PointsYou're welcome and welcome to Treehouse, Eoghan Uttley !
Jan Van Raemdonck
22,961 PointsI think you forgot a semicolon
<?php echo $name; ?>
EDIT
if you only want to echo 1 variable you can also use the shorthand notation:
<?=$name?>
Eoghan Uttley
1,076 PointsStill doesn't work no :(
Liam Linacre
Courses Plus Student 386 PointsLiam Linacre
Courses Plus Student 386 PointsIt's a good idea to post the question. Not everyone who can help has necessarily seen the question.