new years – Kevin Gulling http://www.kevingulling.com Game Development, VR, and more Sun, 30 Nov 2014 19:43:34 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.13 81085834 PHP Dynamic Copyright Date Script https://kevingulling.com/2014/11/51/ Sun, 30 Nov 2014 12:40:33 +0000 https://kevingulling.com/?p=51   Never update the copyright date at the bottom of your php pages again! Copyright (Your dynamic date). There are many scripts that accomplish this available out there, but most are javascripts that reflect the users time/date. If your user has their clock set back a year, your copyright date will be set back a […]

The post PHP Dynamic Copyright Date Script appeared first on Kevin Gulling - Game Development, VR, and more.

]]>
newyears_php_pro_tip

 

Never update the copyright date at the bottom of your php pages again!

Copyright (Your dynamic date).

There are many scripts that accomplish this available out there, but most are javascripts that reflect the users time/date. If your user has their clock set back a year, your copyright date will be set back a year as well. Avoid this and keep your content looking fresh with the following simple code:

 

<?php
    $dateyr = date(‘y’);
    echo”&copy;20″.$dateyr.” yourwebsitehere.com”;
    ?>

 

That’s it, you’re good to go until 2100. We could easily accommodate for the rollover to 2100, but that’s another line or two of code that most of us will never need…

The post PHP Dynamic Copyright Date Script appeared first on Kevin Gulling - Game Development, VR, and more.

]]>
51