Re: print html code

From: Date: Wed, 02 Jul 2003 21:00:37 +0000
Subject: Re: print html code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-153777@lists.php.net to get a copy of this message
On Jul 2, 2003, "Karina S" claimed that: |Hello, | |I want to make a php site which can generate a html code and display it on |the screen. (Display the code itself.) |I use htmlspecialchars() function. It works fine, but now I have to add |about 200 lines of static html code to print it out. If I put all of the |code in a string than it will appear in a single line. (Maybe it works, but |not nice) | |How can I easy print out more lines of html code with php? | |Thanks! | Make sure you're putting \n in the string, then print nl2br(htmlspecialchars($string)); Use php's wordwrap() or find another word_wrap function then print wordwrap(htmlspecialchars($string)); -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855.

« previous php.general (#153777) next »