Jump to content

Recommended Posts

I have a similar problem to this thread, but not quite:

http://www.phpfreaks.com/forums/index.php/topic,305228.0.html

 

In a MySQL table of format MyISAM I have a long text string. The string has a few line breaks here an there as it is input from a text area.

 

These line breaks are formatted ok when inputted into another textarea. However, when I try to put the text into a normal div, the line breaks are ignored and the text is viewed as one big lump (a big paragraph), like this:

Football practice this month for the gremlins: Mike Jones on every other saturday. Smith on every other sunday.

 

 

When i view the source however the breaks are there (sort of), here's the source of the html:

 

Football practice this month for the gremlins:

 

Mike Jones on every other saturday.

 

Pete Smith on every other sunday.

 

As you can see, the line breaks are there in the source code, but there are no line breaks printed in the browser. How do I add <br/> when I've nothing to search for (if that makes sense [how the text looks int he source is also how it is stored in mysql table])

 

Link to comment
https://forums.phpfreaks.com/topic/208652-linebreaks-into-divs-from-mysql/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.