分类:代码片段
2015
07-04
主体代码:functiontoChineseNumber($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->cnyMap...
继续阅读 >
2015
03-26
2015
02-06
<?phpechodate("Ymd",strtotime("now")),"\n";echodate("Ymd",strtotime("-1weekMonday")),"\n";echodate("Ymd",strtotime("-1weekSunday")),"\n";echodate("Ymd",strtotime("+0weekMonday")),"\n";echodate("Ymd",strtotime("+0weekSunday")),"\n";echo"*********第几个月:";echodate('n');echo"*********本周周几:";echodate("w");echo"*********本月天数:";...
继续阅读 >
2015
01-30
2015
01-27
PHP判断前/后一天,或前后多少天的代码:<?phpdate_default_timezone_set('PRC');//默认时区echo"今天:",date("Y-m-d",time()),"<br>";echo"今天:",date("Y-m-d",strtotime("18june2008")),"<br>";echo"昨天:",date("Y-m-d",strtotime("-1day")),"<br>";echo"明天:",date("Y-m-d",strtotime("+1day")),"<br>";echo"一周后:",date("Y-m-d",strtotime("+1week")),"<br>";echo"...
继续阅读 >
2015
01-27
2015
01-27