Playground

In this category you will find experiments, plugins and articles related to web development and programming. Here we present some new ideas and inspiration for solving problems and tackling challenges around web development.

Calculate the number of days between two dates

by

Here’s a simple function that calculates the number of days between two dates. <?php //day’s seconds = 86400 function days_between($day_i,$month_i,$year_i,$day_f,$month_f,$year_f){ $days_in_between = (mktime(0,0,0,$month_f,$day_f,$year_f) – mktime(0,0,0,$month_i,$day_i,$year_i))/86400; return $days_in_between; } ?> //If […]

+ more