Skip to content

IT Blog

Vyacheslav Gapon – personal blog, manuals, articles, notes, development

  • РусскийРусский

How to display the current year in the footer of the site

Posted byVyacheslav 05.02.2020 Leave a comment on How to display the current year in the footer of the site

Let’s say the current year and copyright are manually specified in the template of the site:

<p>Copyright © 2013-2020</p>

And in order not to edit and indicate the current year manually each year, you can automatically get it using PHP code:

<?php echo date('Y'); ?>

That is, it should turn out:

<p>Copyright © 2013-<?php echo date('Y'); ?></p>
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • More
  • Click to share on Pocket (Opens in new window)
  • Click to share on Skype (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to print (Opens in new window)
Posted byVyacheslav05.02.2020Posted inPHP, Web server

Post navigation

Previous Post Previous post:
NAT Modules for VPN, FTP, SIP
Next Post Next post:
Deny internet access on Mikrotik

Leave a comment

Leave a Reply Cancel reply

Categories

Contacts
DONATE
About it
Privacy
Subscribe by Email (EN)
Подписаться по Email (RU)
YouTube
Instagram

При использовании материалов, активная ссылка на сайт ixnfo.com обязательна!
When using materials, an active link to ixnfo.com is required!

IT Blog © 2013-2023 Privacy Policy