DISQUS

Tech-Recipes: PHP: Print the current year for copyright notices | PHP programming | Tech-Recipes

  • Sam IT · 11 months ago
    Why so many echos?

    Use one echo

    echo '© ' . date('Y');

    or

    sprintf( 'Copyright © %s - All right reserved.', date('Y') );
  • veonexus · 10 months ago
    <?=date("Y")?> if in html, so:

    <span><pre>©</pre> <?=date("Y")?></span>
  • Emil · 8 months ago
    How about only this:

    © <?php echo date("Y"); ?>
  • Flight · 1 week ago
    thanks for your tip