Jump to content

Trying to make a blog ..


kstyrvoll

Recommended Posts

Please excuse me for this question, but ..

I have made a blog, everything is working as expected exept displaying of articles I have posted.

When I make a new article, I use carriage return(enter) and format the article into several sections:
Example:
-start
This is a little problem.

Please help.
-end

But when I displays the article on my blog, it is "densed" together:
-start
This is a little problem. Please help.
-end

When I open the article for editing, the formatting is correct.

Sorry for not posting any code, but I don't have access to my pc or my isp from where I'm sitting right now.
Thanks in advance.

Kristian
Link to comment
Share on other sites

[quote]
nl2br($_POST['your text field']);

This is new line 2 break. It will automatically insert a[code] <br /> [/code]tag into the date wherever it finds a new line (carriage return).

nate
[/quote]

They have cut down the modify time, so I could not fix a couple things I wanted.

You then would reverse it with a [code]str_replace('<br />', '\n', $your_text_var_name)[/code]
Link to comment
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.