No more words, let’s get to the code.
![](http://www.bkjia.com/uploads/allimg/140310/052203D07-0.gif)
![PHP string interception, replace the excess part of the title with '...'_PHP Tutorial]()
sub_title(
= 50 = ()<= ? : (mb_substr(,0,,'utf-8')."..."
View Code
After testing it, I feel that the following code is better. The code is as follows:
![](http://www.bkjia.com/uploads/allimg/140310/052203D07-0.gif)
sub_title( = 23 mb_strlen(, 'utf-8')<= ? : (mb_substr(,0, ,'utf-8')."..."
View Code
http://www.bkjia.com/PHPjc/738534.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/738534.htmlTechArticleNo more words, let’s get to the code. sub_title( = 50 = ( )= ? : (mb_substr( ,0, ,'utf-8')."..." View Code After testing it, I feel that the following code is better. The code is as follows: sub_tit.. .