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>

 

 

Comments are closed.