Skip to content

Instantly share code, notes, and snippets.

@mannieschumpert
Last active December 16, 2015 00:09
Show Gist options
  • Save mannieschumpert/5344974 to your computer and use it in GitHub Desktop.
Save mannieschumpert/5344974 to your computer and use it in GitHub Desktop.
A simple PHP function to print copyright date
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