Getting line breaks to work?
Moderator: General Moderators
Getting line breaks to work?
Hey all, I got a piece of code going along, much to the help of people here such as volka hehe... but yeah, it access a database (shared with phpbb) grabs some text, (post_text) now (hopefully one of) my problem(s) is that line breaks arnt happening or return, what ever you would like to call them... do these need to be enable some how??
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Ahh ok, hmm reading the manual part on using nl2br didnt tell me alot about actually using it in my script, hmm forgive my newbness, but a lil help in how to if possible?
I want tp apply it to this section of my script:
I want tp apply it to this section of my script:
Code: Select all
<?php echo $row['post_text']; ?>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Just use it on the variable like so:
Don't worry about being new to this, we all had to start somewhere.
Mac
Code: Select all
<?php echo nl2br($row['post_text']); ?>Mac