jquery - how to increase a static number automatically everyday using php -
i use wordpress , have static number field taken sql query.
<p class="counter-number">843</p>
i increase number everyday. example when page loaded default number 843 next day should show 844 day after should show 845.
how can this? prefer php if possible can use jquery.
<?php $now = time(); $your_date = strtotime("2010-01-01"); //starting date $datediff = floor(($now - $your_date)/(60*60*24)); ?> <p class="counter-number"><?=$datediff?></p>
code taken finding number of days between 2 dates
this way show difference starting date now, in days.
Comments
Post a Comment