ThinkPHP 截取字符串有关问题

WBOY
Release: 2016-06-13 13:52:11
Original
917 people have browsed it

ThinkPHP 截取字符串问题
刚用ThinkPHP 一个截取字符串函数 但是模板里却输不出来

代码:
$news_list = $model_list->findall('',$fields,'dateline desc',$p->firstRow.','.$p->listRows);
  /*截取字符串*/  
  foreach ($news_list as $x=>$y) {
$news_list[$x]['content']=cut_str(Zmor_ireplace($y['content']),30,0,"UTF-8"); //截取字符串函数
}

  //模板输出
  $page = $p->show();  
  $this->assign('news_list',$news_list);



------解决方案--------------------
$news_list[$x]['content']=msubstr(Zmor_ireplace($y['content']),0,30,"UTF-8");
试下

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!