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 trialSimon Strömberg
1,423 Pointsyear
Hello!
This code: <p>©<?php echo date('y'); ?> Shirts 4 Mike</p>
Display the year as "15" and not "2015" How come?
Regards
5 Answers
Wilson Usman
35,206 PointsYou need to use capital Y
<?php echo('Y');?>
Simon Strömberg
1,423 Points<?php echo('y'); ?>
Simon Strömberg
1,423 PointsIt does not display the php code...
<? php (''y) ; ?>
Im using spaces now becuase it does not display if i post it correctly.
Simon Strömberg
1,423 Points...
Here is image instead: https://puu.sh/en6g1/90163bac07.png
Frank D
14,042 PointsHi 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!
Simon Strömberg
1,423 PointsThank you
Wilson Usman
35,206 PointsWilson Usman
35,206 PointsSimon, what code? Can you add it?