Welcome to WebmasterWorld Guest from 18.206.48.142

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

displaying plain text in html format

how can it be done

     
3:37 pm on Oct 11, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Mar 10, 2003
posts:321
votes: 0


hello everyone, i have a variable called $header and when i echo the variable into my php script i get a text format display and i can only view it correctly when i view the source in notepad, which looks like this:

Date: Mon, 11 Oct 2004 06:39:36 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Content-Transfer-Encoding: Quoted-Printable

but in the html page it all displays like this:

Date: Mon, 11 Oct 2004 06:39:36 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Content-Transfer-Encoding: Quoted-Printable

how can i make it so that the text is displayed as it is in notepad?

Thanks

3:46 pm on Oct 11, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:July 29, 2003
posts:72
votes: 0


<pre>
some preformatted plain text
using line breaks etc
and stuff...
</pre>

Just remember to htmlentities() the text first in case it contains html stuff (or leave it in etc - just be aware that it might be html, or plain text - the ">" character is normally used for quoting, and browsers are probably not going to be happy finding a couple of line of them ;-)

Robin

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members