Re: dynamic copyright in page footer?

From: Date: Sat, 30 Apr 2011 11:10:11 +0000
Subject: Re: dynamic copyright in page footer?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-312582@lists.php.net to get a copy of this message
On 30/04/2011, at 11:06 PM, David Mehler wrote: > Hello, > > I am trying to use php to put a copyright notice in a page footer. I'm > using the date function with the "Y" value for the year. Here's the > code: > > <?php > echo date ('Y'); > ?> > > This works great for a site done in 2011 but next year I'm going to > want to have 2011 and 2012 in the copyright notice, adding an > additional year the site's up. I'd appreciate some suggestions i'm > very likely overthinking this. > > Thanks. > Dave. I would use something simple like: if(date('Y') == '2011') { echo '2011'; } else { echo '2011-', date('Y'); } --- Simon Welsh Admin of http://simon.geek.nz/ Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e

« previous php.general (#312582) next »