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

Simon Strömberg
Simon Strömberg
1,423 Points

year

Hello!

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

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

Regards

Wilson Usman
Wilson Usman
35,206 Points

Simon, what code? Can you add it?

5 Answers

Wilson Usman
Wilson Usman
35,206 Points

You need to use capital Y

<?php echo('Y');?>
Simon Strömberg
Simon Strömberg
1,423 Points

It does not display the php code...

<? php (''y) ; ?>

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

Frank D
Frank D
14,042 Points

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!