Home >Backend Development >PHP Tutorial >How to use wordwrap to format text paragraphs in php_PHP tutorial
This article mainly introduces the method of PHP using wordwrap to format text paragraphs, involving the use skills of wordwrap function, which has certain reference For reference value, friends in need can refer to it
The example in this article describes how PHP uses wordwrap to format text paragraphs. Share it with everyone for your reference. The specific analysis is as follows:
The wordwrap() function can format text paragraphs according to the specified fixed line length, making the paragraphs look neater
?
3 4
5
6
9 10 |
$string = str_replace("r", " ", $string); print(wordwrap($string, 40)."n");
<🎜>?>
|
1 2 3 4 5 6 | 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. |