|
 |
|
ต้องการทราบวัน(ในสัปดาห์) โดยรับค่าจาก วันที่เดือนปี |
|
 |
|
|
 |
 |
|
Code (PHP)
<?php
date_default_timezone_set('Asia/Bangkok');
//26/09/2009
echo "September 26, 2009 is on a " . date("l", mktime(0, 0, 0, 26, 9, 2009));
?>
|
 |
 |
 |
 |
Date :
2009-09-26 15:08:11 |
By :
extenser |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมลองทำแล้วครับ แต่วันที่ได้ไม่ถูกนะครับ
แต่ขอบคุณมากๆครับ ท่านมีข้อแนะนำอีกไหมครับ
September 26, 2009 is on a Wednesday
|
 |
 |
 |
 |
Date :
2009-09-26 16:24:32 |
By :
lnw_144 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ต้องขออภัยครับ ผมใส่ตัวแปรสลับ
Code (PHP)
<?php
date_default_timezone_set('Asia/Bangkok');
//26/09/2009
echo "September 26, 2009 is on a " . date("l", mktime(0, 0, 0, 9, 26, 2009));
?>
ผลลัพธิ์ => September 26, 2009 is on a Saturday
ต้องเป็น เดือน / วัน / ปี 
|
 |
 |
 |
 |
Date :
2009-09-27 04:19:02 |
By :
extenser |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|