PHP 数字大小写转换?
function daxie($number){
$number=substr($number,0,2);
$arr=array("零","一","二","三","四","五","六","七","八","九");
if(strlen($number)==1){
$result=$arr[$number];
}else{
if($number==10){
$result="十";
}else{
if($number<20){
$result="十";
}else{
$result=$arr[substr($number,0,1)]."十";
}
if(substr($number,1,1)!="0"){
$result.=$arr[substr($number,1,1)];
}
}
}
return $result."
";
}
echo daxie(7);
echo daxie(11);
?>
只能是两位的