php wordwrap () function syntax
wordwrap () function how to use?
wordWrap () function indicates the string wrapped treated to a specified length, the syntax is wordwrap (string, width, break, cut), if the function is executed successfully, the fold line of the character string is returned, if it fails, false is returned.
Effect: the string wrapped treated to a specified length
语法:wordwrap(string,width,break,cut)
parameter:
parameter | description |
string | It must be a predetermined string of wrapped |
width | Optionally, specify a maximum line width, the default is 75 |
break | Alternatively, using a predetermined delimiter character (character string is disconnected), the default is "\ n". |
cut | Alternatively, whether or not a predetermined width greater than a specified word to wrap: false - default, no-wrap. true - wrapped. |
Description : If the function is successfully executed, the string is returned wrapped, if it fails, false is returned. Marble members how to
php wordwrap () function examples
<?php $i = "I love programming. It's fun."; $j = wordwrap($i,10,"<br>\n",true); echo $j; ?>