Posted by Alvaro G Vicario on 08/24/05 15:09
*** JAPIO wrote/escribió (23 Aug 2005 03:08:45 -0700):
> I have two variables which look like:
> $begin = "23-08-05"
> $end = "26-08-05"
>
> Now i want also to know the dates between them.
> 24-08-05
> 25-08-05
Days or dates?
For days (not tested):
<?
$begin = "23-08-05";
$end = "26-08-05";
echo ceil( (strtotime($end)-strtotime($begin)) / 86400 );
?>
I not sure though whether strtotime() works with European format.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
[Back to original message]
|