You need to wrap lines in a string.
Use wordwrap(). By default, wordwrap() wraps text at 75 characters per line.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN"> <head> <title>PHP</title> <meta Name="Author" Content="Hann So"> </head> <body> <p> <?php $string = "Four score and seven years ago our fathers brought forth on this continent a new nation, concived in liberty and dedicated to the proposition that all men are created equal."; echo "<pre>", wordwrap($string), "</pre>"; echo wordwrap($string, 50); ?> </p> </body> </html> |