 |
|
Code
<?php
$date_start = "2009/02/26"; //ว.ด.ป เริ่มต้น
$date_end = "2009/02/26"; //ว.ด.ป สุดท้าย
$date1=explode("/",$date_start);
$date2=explode("/",$date_end);
$init_date = mktime(12,0,0,$date1[1],$date1[2],$date1[0]);
$dst_date = mktime(12,0,0,$date2[1],$date2[2],$date2[0]);
$offset = $dst_date-$init_date;
$days = floor($offset/60/60/24);
if ($days<0) echo ("ไม่ถูก");
else echo ("ถูก");
?>
ประยุกต์ใช้ดูนะครับ
|
 |
 |
 |
 |
Date :
2009-03-28 10:29:56 |
By :
นักเรียน |
|
 |
 |
 |
 |
|
|
 |