Home >Backend Development >PHP Tutorial >PHP string interception, replace the excess part of the title with '...'_PHP Tutorial

PHP string interception, replace the excess part of the title with '...'_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:36:291299browse

No more words, let’s get to the code.

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:

PHP string interception, replace the excess part of the title with '...'_PHP Tutorial sub_title( = 23 mb_strlen(, 'utf-8')<= ? : (mb_substr(,0, ,'utf-8')."..." View Code

www.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.. .
Statement:
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