Home > Backend Development > PHP Tutorial > 截取字符串,长度不一样,该如何解决

截取字符串,长度不一样,该如何解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:25:04
Original
1610 people have browsed it

截取字符串,长度不一样

截取字符串,长度不一样

<br /><br /><?PHP $prna=$row['description'];<br />		   if(strlen($prna)>20)<br />		{<br />		$prna=mb_substr($prna,0,40,'utf-8')."...."; <br />		echo $prna;<br />		}<br />		else<br />		{<br />		echo $prna;<br />		}	   <br />	   <br />	   <br />	   ?><br /><br />
Copy after login


截图经常上传不了,不知道是不是电脑有问题

结果:
MicroSD 轉 Produo DUO 轉換器....
PSP3000 排線(3件裝)....
iPhone3GS SIM card 座 (黑色)....
Nokia CA-101D 短 MicroUSB數據線....
PSP2000 用底蓋(黑色)....
PSP2000 電源接線 ....
3.5mm 膠塞吊繩(黑色)....
iPhone 透明底塞 (3個)....

Related labels:
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