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 Creating the Menu and Footer Starting the Project

year

Hello!

This code: <p>©<?php echo date('y'); ?> Shirts 4 Mike</p>

Display the year as "15" and not "2015" How come?

Regards

Simon, what code? Can you add it?

5 Answers

You need to use capital Y

<?php echo('Y');?>

<?php echo('y'); ?>

It does not display the php code...

<? php (''y) ; ?>

Im using spaces now becuase it does not display if i post it correctly.

...

Here is image instead: https://puu.sh/en6g1/90163bac07.png

Hi Simon, you seem to forget the function date before the ("Y").

 <?php echo('Y');?> 

The correct code would be:

<?php echo date('Y'); ?>

Hope this helps!

Thank you