 |
|
เนื่องจากเวลาเรียงข้อมูลแล้วมันจะเรียงแบบนี้
1
11
12
2
22
26
3
31
แบบนี้อ่ะครับ
อยากให้เรียงแบบ
1
2
3
10
11
12
13
14
อ่ะครับ
ปล.ใช้คำสั่ง Sort อะครับ
Code (PHP)
<?php
$thai_day_arr=array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์");
$_month_name = array("01"=>"มกราคม", "02"=>"กุมภาพันธ์", "03"=>"มีนาคม",
"04"=>"เมษายน", "05"=>"พฤษภาคม", "06"=>"มิถุนายน",
"07"=>"กรกฎาคม", "08"=>"สิงหาคม", "09"=>"กันยายน",
"10"=>"ตุลาคม", "11"=>"พฤศจิกายน", "12"=>"ธันวาคม");
$vardate=date('Y-m-d');
$yy=date('Y');
$mm =date('m');
$dd=date('d');
}
$date=$dd ." ".$_month_name[$mm]." ".$yy+= 543;
function thai_date($time){
global $thai_day_arr;
$thai_date_return="วัน".$thai_day_arr[date("w",$time)];
return $thai_date_return;
}
?>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2010-05-19 00:37:54 |
By :
veeravat |
View :
3302 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |