本文实例讲述了php使用wordwrap格式化文本段落的方法。分享给大家供大家参考。具体分析如下:
wordwrap()函数可以按照指定的固定行长度格式化文本段落,让段落看起来更加整齐
<"TRADING ON MARGIN POSES ADDITIONAL RISKS AND IS NOT SUITABLE FOR ALL INVESTORS. A COMPLETE LIST OF THE RISKS ASSOCIATED WITH MARGIN TRADING IS AVAILABLE IN THE MARGIN RISK DISCLOSURE DOCUMENT."; $string = str_replace("\n", " ", $string); $string = str_replace("\r", " ", $string); print(wordwrap($string, 40)."\n"); "htmlcode">TRADING ON MARGIN POSES ADDITIONAL RISKS AND IS NOT SUITABLE FOR ALL INVESTORS. A COMPLETE LIST OF THE RISKS ASSOCIATED WITH MARGIN TRADING IS AVAILABLE IN THE MARGIN RISK DISCLOSURE DOCUMENT.希望本文所述对大家的php程序设计有所帮助。
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“php使用wordwrap格式化文本段落的方法”评论...