该函数实现将数字转换为英文月份
[CODE:]
class Num_Chinese{
private $Month_E = array(1 => "January",
2 => "February",
3 => "March",
4 => "April",
5 => "May",
6 => "June",
7 => "July",
8 => "August",
9 => "September",
10 => "October",
11 => "November",
12 => "December");
public function Month_E($Num){
return $this -> Month_E[$Num];
}
}
?>
使用方法
[CODE:]
require_once("./上面类函数的页面名称");
$da = new Num_Chinese();
echo $da -> Month_E(1);
?>
哇,这么简单,莫不是初学的时候........
[CODE:]
class Num_Chinese{
private $Month_E = array(1 => "January",
2 => "February",
3 => "March",
4 => "April",
5 => "May",
6 => "June",
7 => "July",
8 => "August",
9 => "September",
10 => "October",
11 => "November",
12 => "December");
public function Month_E($Num){
return $this -> Month_E[$Num];
}
}
?>
[CODE:]
require_once("./上面类函数的页面名称");
$da = new Num_Chinese();
echo $da -> Month_E(1);
?>
哇,这么简单,莫不是初学的时候........