09 2012 档案

摘要://保留小数点后2位,四舍五入{%assign var="distKM" value="100.345"%}{%$distKM|string_format:"%.2f"%}//echo:100.35 阅读全文
posted @ 2012-09-06 15:56 Younger 阅读(159) 评论(0) 推荐(0)
摘要://获取字符串长度 strlen($abc);//替换字符串中的字符 strtr($abc,'-','-');//拆分字符串 explode("-",$abc);//编码字符串 urlencode($abc);//格式化日期 date('Y-m-d',strtotime($abc));//判断当前日期和指定日期相差几天 (strtotime($today)-strtotime($gd))/3600/24;//UTF-8编码下全角符号替换成半角$tags = "0123ABCDFWS\",.?<>{}[]*&^%#@! 阅读全文
posted @ 2012-09-05 20:00 Younger 阅读(149) 评论(0) 推荐(0)