01.
<meta charset=
"utf-8"
/>
02.
<?php
03.
$date_1
=
array
(
"2014-08-14"
,
"2014-09-01"
,
"2014-10-31"
);
04.
$date_2
=
array
(
"2014-08-31"
,
"2014-09-30"
,
"2014-10-31"
);
05.
$count
=
count
(
$date_2
);
06.
for
(
$i
= 0;
$i
<
$count
;
$i
++){
07.
$date_3
= (
strtotime
(
$date_2
[
$i
])-
strtotime
(
$date_1
[
$i
]))/86400 ;
08.
echo
$date_3
;
09.
echo
" วัน <br />"
;
10.
}
11.
?>