![]() |
line breaks
how do i make sure that when inserting this code into the database it adds any line breaks that may be typed out by the users?
PHP Code:
|
well, it automatically adds linebreaks by the users into the DB.
just when you output the msg, you have to make sure they are parsed (nl2br()) |
oh ok, so it's on the output side i have to worry about the line breaks, ok then, would i put the (nl2br()) around the query to select the date from the database ala
PHP Code:
[high]* sabret00the thinks he might have to dig out his php book :nervous:[/high] |
nope, not around the query.
lets say you have this: PHP Code:
but if you use PHP Code:
btw. if you use parse_bbcode it will automatically use nl2br :) |
sorry to be a pain stefan, but i don't think i'm getting this, so heres the code that outputs what i'm trying to show up with line breaks
PHP Code:
|
just put a $text = nl2br($text); before the evel project bits part :)
|
thanks xenon you're a great help :D
|
:)
you're always welcome :) |
sorry to be a pain xenon but it didn't work :(
|
i suggest to use this code, that should work :)
PHP Code:
|
All times are GMT. The time now is 07:35 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|