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 trial

PHP Build a Simple PHP Application Getting Started with PHP Your First PHP File

<p>&copy;<?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?

example.php
<!DOCTYPE html>
<html>
<body>
    <h1>Shirt 4 Mike</h1>
      <p>&Copy;<?php echo date('Y'); ?> Shirts 4 Mike</p>
</body>
</html>

Hello, it's still 404 not found. I don't know why?

5 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Add a PHP command that would display the name of our website, Shirts 4 Mike, inside the H1 tag.

couple of issues in your code

  1. your php code isn't placed inside the h1 tag
  2. 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
Alfred Angkasa
2,413 Points

Hello.. What do you want to achieve?

I 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???

<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?

Is your local web server running?