Jump to content

nl2br Help


DanyalSakrani

Recommended Posts

OK so that works. There must be something in your code which escapes the newlines characters. Not sure what's up but I will have a look.

 

@ redarrow

like i said was your action='' and char-set

No that was my code DanyalSakrani said worked.

 

Yeah. I added the action, and removed the char-set. It didn't work. And thanks :D

Link to comment
https://forums.phpfreaks.com/topic/42027-nl2br-help/page/2/#findComment-203887
Share on other sites

I have solved it. As he/she has yet to be able to find out why his script is not converting the newlines.

 

I ahve just simply did a bit of basic debugging to see if its the server that is at fault. But as my code is running as it should then I have assumed it must be something is his/her script that is not quite right.

 

ALso by the way this post:

accept-charset='iso-8859-1 <<<<<<<<<<, this is why

try without it ok.

No offence but makes no sense at all! At least provide an example and explain where its supposed to go. Rather than just posting a snippet and saying use that.

Link to comment
https://forums.phpfreaks.com/topic/42027-nl2br-help/page/2/#findComment-203895
Share on other sites

I have solved it. As he/she has yet to be able to find out why his script is not converting the newlines.

 

I ahve just simply did a bit of basic debugging to see if its the server that is at fault. But as my code is running as it should then I have assumed it must be something is his/her script that is not quite right.

 

ALso by the way this post:

accept-charset='iso-8859-1 <<<<<<<<<<, this is why

try without it ok.

No offence but makes no sense at all! At least provide an example and explain where its supposed to go. Rather than just posting a snippet and saying use that.

 

Hey, you know how to fix it? :o. Can you post the solution? Thanks!

Link to comment
https://forums.phpfreaks.com/topic/42027-nl2br-help/page/2/#findComment-203903
Share on other sites

I thought that nl2br only worked when echoing data, not when inserting it in to a database...

 

I have always just had the user fill out a text box where they hit enter for a new line. Then insert it in to a TEXT field in my table. Then when I display it I use nl2br.

 

I have never had any problems with that.

Link to comment
https://forums.phpfreaks.com/topic/42027-nl2br-help/page/2/#findComment-203957
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.