首页 > 教程 >
织梦php汉字字符串中间插入换行符方法
2023-02-25教程围观次
简介织梦php汉字字符串中间插入换行符实现函数方法:functionstrsub($str){$str_count=mb_strlen($str,'utf-8');$mid=ceil($str_count/2);returnmb_substr($str,0,$mid,'utf-8')."".mb_substr($str,$mid,$str_count,'utf-8');}
织梦php汉字字符串中间插入换行符实现函数方法:
function strsub($str){$str_count=mb_strlen($str,'utf-8');$mid=ceil($str_count/2); return mb_substr($str,0,$mid,'utf-8')."<br/>".mb_substr($str,$mid,$str_count,'utf-8');} |
下载链接:网站源码/小程序源码/网站模板下载