Jump to content

Best Way To Make A Message - HELP!!


oliverj777

Recommended Posts

Basically, All I want to do is save a .txt (doesn't have to be .txt) to my FTP and PHP simple echos it. The .txt is where a message is stored. But when I write the message my self like this:

Hello

 

This is a message.

 

- And then upload it to my FTP, PHP echos it like this "HelloThis is a message". Is there anyway for PHP to notice the 'white space'?

 

--OR--

 

If you know of a better way to make a message system, then also let me know

 

Thanks, Ollie!

Link to comment
https://forums.phpfreaks.com/topic/211617-best-way-to-make-a-message-help/
Share on other sites

It isn't PHP that ignores the white-space, it's the browser. If you look at the source you'll see the spacing is preserved. HTML offers the <pre> tag that by default preserves white-space, or you can apply the CSS property white-space:nowrap;.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.