|
Author |
Message |
craig
Junior WebHelper
Joined: 09 Jul 2002
Posts: 3
|
Posted:
Tue Jul 09, 2002 2:31 am (21 years, 9 months ago) |
|
hi, i scanned the boards but couldnt find an answer to this.
i have my php connected to a sql db to retrieve items of text.
in my database i have text items that are nicely spaced out with returns for new lines etc.
when i retrieve this using my php script it prints out as a long string (because html doesnt recognise returns).
is there a function, or a script, that i can run on my text to replace the returns with <br> or whatever?
Either when inputting the text (using a php form) or retrieving the text from the database, or even both if needed.
it's probably really simple, i tried looking through the script for a BB but couldnt find it. I also have a problem with ' . Are there any other characters i need to be wary of?
Thanks in advance. |
|
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Tue Jul 09, 2002 8:00 am (21 years, 9 months ago) |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Tue Jul 09, 2002 8:30 am (21 years, 9 months ago) |
|
Note: in the newer versions of PHP, it will return an XHTML compliant tag (ie: <br />). |
________________________________
|
|
|
|
craig
Junior WebHelper
Joined: 09 Jul 2002
Posts: 3
|
Posted:
Tue Jul 09, 2002 12:03 pm (21 years, 9 months ago) |
|
Thanks a lot for the help, I'll give it a go |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.126783 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |