Jump to content

[SOLVED] Formatting text through php


Infected.Shadow

Recommended Posts

Okay so I haven't written any code for this yet. I would also like to apologize if I'm not communicating this thoroughly. I'm finding it hard to describe the problem at hand.

 

My problem is this:

 

Say a user enters this into a text field:

 

This is a line!

 

This line is lower!

 

Now on most sites I've been to, it would output like that on the page. When I go to try this in my code it always ends up coming out like this:

 

This is a line! This line is lower!

 

So usually I'm pulling these values from a database, so I'm wondering if there is a function in php that will keep the same formatting the user wants (Spaces, line skips, etc.). Any help would be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/138601-solved-formatting-text-through-php/
Share on other sites

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.