surabaya web designer
cheap web promotion indonesia
design graphics and online shopping cart
     category      articles    
 

Adsense

Adwords

Article

Blog

CMS

CSS Style

Datacenter

Design Graphics

Flash Animation

Internet Radio

Messenger

Programming

Provider

Search Engine

Security

Security Web

SEF

SEO

Software

Software Web

Count how many days

If you have a date from x to y, and you want to count how many days from that date, you can use function strtotime at php.
You can try like below:

$from = "2007-05-1";
$to = "2007-05-3";
$day =floor((strtotime($from)-strtotime($to))/86400);
print $day;

86400 is seconds in a day (24 hours x 60 minutes x 60 seconds).
If you count that date, your result will be 2 days.

OTHER ARTICLES

htaccess Useful

Passing value from child window to parent

AllowOverride directive for Apache

htaccess at Windows

CoreDumpDirectory directive

About Pico at Linux

SnoopFree

AuthAuthoritative directive

AuthDigestRealmSeed directive for Apache

Doctypes for XHTML docs