HOW TO: Automatically Update The Copyright Year
- Updated On 23/04/2011
- Author : Pradeep Kumar
- Topic : Blogging • Guides
- Short URL : http://hbb.me/12JJG9p
CONNECT WITH HBB ON SOCIAL MEDIA
The output will be like this :
© Copyright 2008-2009
Note : You should update the starting year for your copyright year.
PHP Code Snippet
© Copyright <?php
$then = 2007;
$now = date(’Y');
if ($then == $now)
echo "$then - $now"; ?>
You can also try this snipper for simplity of code
© Copyright 2007 - <?php echo date('Y'); ?>
Note : You need to edit $then for setting it to the year your blog launched. The final year is automatically calculated using date() function of PHP.
Want to discuss your queries and interact with experts? You can connect with HellBound Bloggers (HBB) Facebook group for free!
Join HellBound Bloggers (HBB) and get Instant Updates. We'll also notify you with Great Deals, Discounts and other Interesting Tips. We won't SPAM or SHARE your Email Address with anyone.
YOU CAN ALSO SEARCH FOR YOUR DESIRED TOPICS:
Thank you for reading! We welcome and appreciate your comments, but at the same time, make sure you are adding something valuable to this article. If you have any serious queries, suggestions or anything related to this article, feel free to share them, we really appreciate that.
But, if your blog comments are a random "Thank you", "Useful Post", or anything that doesn't actually upscale the article, then we'll be removing them and it won't be appeared below. Thanks for understanding and thanks for connecting with us. If you want to give us any feedback or report any errors, you can kindly contact us and we'll revert back soon.
- Facebook Comments
26 CommentsFacebook Comments