Dynamic copyright year with php

Nov 24, 2008 Author: vvaswani

On the footer on website we see All rights reserved John Smith copyright 2000 - 2007 That is hard for editing on all your pages every year . With PHP we can do this process very fast in footer of your page put


1- <?php
2- echo (“All rights reserved pelaphptutorials.com copyright 2005 - “
3- . Date('Y'));
4- ?>
and result will be " All rights reserved pelaphptutorials.com copyright 2005 - 2007? if we change Date('Y'); into Date('y'). result will be All rights reserved pelaphptutorials.com copyright 2005 - 07


views 13353
  1. Add New Comment