Home > Article > Backend Development > PHP string interception, replace the excess part of the title with "..."_PHP Tutorial
No more words, let’s get to the code.
sub_title( = 50 = ()<= ? : (mb_substr(,0,,'utf-8')."..." View CodeAfter testing it, I feel that the following code is better. The code is as follows:
sub_title( = 23 mb_strlen(, 'utf-8')<= ? : (mb_substr(,0, ,'utf-8')."..." View Code