Make the Year update automatically with php

So I’m lazy when it comes to these things about dates but everyone has their own of doing it. The old school way of doing it was simple. You hard code it.  Technically, this is not an advanced course or something difficult. You can teach a 4 year old how to do this but we are veering away from the front end development a little and going into programming.

So yeah this code is less than 20 characters but if you put in a regular html page, it won’t work if you know what I mean.  I’m not sure If I’m going to be writing more post about php yet?

<p>Copyright &copy; <?php echo date('Y'); ?> - My Website </p>

 

 

Share on FacebookShare on Google+Pin on PinterestShare on RedditTweet about this on TwitterShare on TumblrShare on LinkedInEmail this to someonePrint this page

One thought on “Make the Year update automatically with php

Leave a Reply