 |
|
Code (PHP)
<? $_month=date('m');
$_month_1=$_month-1;
$_month_2=$_month+1;
$start = mktime(0, 0, 0,$_month_1,27,date('y'));
$end = mktime(0, 0, 0,$_month_2,26,date('y'));
$date_second = 24*60*60;
for($d=$start; $d<=$end; $d+=$date_second)
{ $coolmonth=date("$setMonth/$d/$myear");
$dateone=date('d',$d);
echo"$dateone";
}
?>
คือว่าผมผิดตรงไหนหรอ ครับ ในการเริ่มให้เค้าวันตามเดือนที่กำหนด โดยให้แสดง วันที่ 27-26 อีกเดือน ผมไม่เข้าอะครับว่า แสดงให้แต่แสดงเป็นแบบนี้

ผมควรแก้ยังไงดีครับ ถ้าเกิดปัญหาอย่างที่เห็นในรูปนี้อะครับ มันวน Loop มากกว่า 1 ครั้งอะครับ
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2010-05-06 10:27:25 |
By :
SOUL |
View :
756 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |