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 trialHAO TRAN
Courses Plus Student 159 Points<p>©<?php echo date('Y'); ?>Shirts 4 Mike</p> So what's wrong?
<p>Ā©<?php echo date('Y'); ?>Shirts 4 Mike</p> So what's wrong?
<!DOCTYPE html>
<html>
<body>
<h1>Shirt 4 Mike</h1>
<p>&Copy;<?php echo date('Y'); ?> Shirts 4 Mike</p>
</body>
</html>
HAO TRAN
Courses Plus Student 159 PointsHello, it's still 404 not found. I don't know why?
5 Answers
William Li
Courses Plus Student 26,868 PointsAdd a PHP command that would display the name of our website, Shirts 4 Mike, inside the H1 tag.
couple of issues in your code
- your php code isn't placed inside the
h1
tag - php code doesn't echo the correct String.
<!DOCTYPE html>
<html>
<body>
<h1>
<?php echo "Shirts 4 Mike"; ?>
</h1>
</body>
</html>
That should fix it. Hope this helps
Alfred Angkasa
2,413 PointsHello.. What do you want to achieve?
HAO TRAN
Courses Plus Student 159 PointsI follow the video but when I preview it say 404 not found. you can see my code. I think there is problem at echo date???
Alfred Angkasa
2,413 PointsTry echo date("y")
HAO TRAN
Courses Plus Student 159 Points<h1>Shirt 4 Mike</h1> <p>&Copy;<?php echo date('Y'); ?> Shirts 4 Mike</p>
please check this code. as I want @2025. I think have a problem with date() function?
jason phillips
18,131 PointsIs your local web server running?
Alfred Angkasa
2,413 PointsAlfred Angkasa
2,413 PointsHello, just try ©.