![]() |
How do i convert /n to linebrake in post's ? - sorta fixed, but not as wanted
Im using a costum made field,,
and using the vb editor to allow some user content to be added.. and in that process a thread is also made, But all line breaks are displayed in the post as \n any ideas why ? and i tryed to str_replace them all with <br /> but ofcourse that only works if admin submits due to html limitations for users.. :D im getting the submitted content like this PHP Code:
help ;) :confused: |
Try the nl2br() php function on it.
|
input test
Code:
line Code:
line\n \nbreak \n \ntest PHP Code:
EDIT / P.S the str replace with <br /> didnt work cause it just showed the damn html code inside the threads, and trying to figure out if i can make a linebreak BBcode if i can get that working i can str_replace that to the line break bbcode ;) --------------- Added [DATE]1271539826[/DATE] at [TIME]1271539826[/TIME] --------------- Well not excaktly great but its working.. BBcode with replacement -- <div >{param}<br /></div> and then str_rep in php -- $bodytext = str_replace('\n', '', $bodytext); and it turns out fine.. lol ;) |
All times are GMT. The time now is 09:56 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:
|