Last active
December 16, 2015 00:09
-
-
Save mannieschumpert/5344974 to your computer and use it in GitHub Desktop.
A simple PHP function to print copyright date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function copyright($start, $owner) { | |
$date = date('Y'); | |
echo "© Copyright "; | |
if ( $start < $date ) { | |
echo "{$start} - "; | |
} | |
echo "{$date} {$owner}"; | |
} | |
/* | |
* Example: if the current year is 2013, copyright('2012', 'My Company'); will print | |
* © Copyright 2012 - 2013 My Company | |
* | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment