function ch_num($num,$mode=true) {
$char = array("zero","一","二","三","四","五" ,"鲁","旒","八","九");
$dw = array("","十","百","千","","万","千亿" ","メガ");
$dec = "ポイント";
if($mode)
preg_match_all("/^0*( d* ).?(d*)/",$num, $ar);
else
preg_match_all("/(d*).?(d*)/",$num, $ar);
if($ar[2][0] != "")
$retval = $dec . ch_num($ar[2][0],false); // 小数がある場合、最初に再帰 小数点の処理
if($ar[1][0] != "") {
$str = strrev($ar[1][0]); 0;$ i
if($mode) {
$out [$i ] .= $str[$i] != "0"? $dw[$i%4] : ""
if($str[$i] $str[$i-1] = = 0)
$out[$i] = "";
if($i%4 == 0)
$out[$i] .= $dw[4 フロア($i/4) )];
}
}
$retval = join("",array_reverse($out)) .
return $retval;
//echo ch_num("12345006789001.123");
//echo ch_num("300045.0123");
?