# Count Days Up-Wards

**URL:** <https://forum.kirupa.com/t/count-days-up-wards/329312>\
**Category:** programming\
**Created:** [August 13, 2012, 12:07am UTC](https://forum.kirupa.com/t/count-days-up-wards/329312 "2012-08-13T00:07:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dannn](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@Dannn](https://forum.kirupa.com/u/Dannn)\
**Post date:** [August 13, 2012, 12:07am UTC](https://forum.kirupa.com/t/count-days-up-wards/329312/1 "2012-08-13T00:07:55Z")

</div>

```php
<?php $days = (strtotime(date("d")) - strtotime($info['-1 Day'])) / (60 * 60 * 24)?>
<?php echo $days?>

```

Hi there! I’m new here, but I need some coding help and this website is actually really fantastic! 🙂

I’m looking for a code (I’m not quite sure whether this should be done in PHP or JSCRIPT) that will count the days upwards from a certain date (the date being 12th August, 2012) but I just want it to display the number of the day. So say if it’s 7 days from the 12th, just to display the number 7.

I’d appreciate any help I could get,

Cheers,  
Dan.
