后端开发|php教程
php
后端开发-php教程
源码可以做什么,删除ubuntu无用引导,爬虫相关类图,php sort,国外主机seolzw
主体代码:
rpg服务端源码,ubuntu自带文件共享,tomcat项目放在哪里,爬虫插件配置,php实例编程,济南微信营销seo推广哪家好lzw
function toChineseNumber($money){ $money = round($money,2); $cnynums = array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖");$cnyunits = array("圆","角","分"); $cnygrees = array("拾","佰","仟","万","拾","佰","仟","亿");list($int,$dec) = explode(".",$money,2); $dec = array_filter(array($dec[1],$dec[0]));$ret = array_merge($dec,array(implode("",$this->cnyMapUnit(str_split($int),$cnygrees)),""));$ret = implode("",array_reverse($this->cnyMapUnit($ret,$cnyunits)));return str_replace(array_keys($cnynums),$cnynums,$ret); }
function cnyMapUnit($list,$units) {$ul=count($units);$xs=array();foreach (array_reverse($list) as $x) { $l=count($xs); if ($x!="0" || !($l%4)) $n=($x== ?\:$x).($units[($l-1)%$ul]); else $n=is_numeric($xs[0][0])?$x:\; array_unshift($xs,$n); } return $xs; }
调用代码:
uehtml 网站源码,安装ubuntu设置中文,行业数据爬虫代码,php7.2 php7.3,温州seo视频lzw
echo toChineseNumber($money);