Re: dynamic copyright in page footer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, April 30, 2011, Simon J Welsh wrote:

> I would use something simple like:
> if(date('Y') == '2011') {
>         echo '2011';
> } else {
>         echo '2011-', date('Y');
> }

... or in one line:

echo (date('Y') != '2011' ? '2011-' : '') . date('Y');

However, you might want to change that to:

echo '2011-' . date('Y');

at the first review after the start of 2012!

HTH,

-- 
Geoff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux