redarrow Posted November 21, 2008 Share Posted November 21, 2008 when a user hit enter to goto the next line, im sure that the database get specill charecter can you tell me what the specil charecter is please.......... i no that nl2br converts it to a <br> or <br /> what the symballs in the database given..... but nl2br uses the \n so what the database symboll for \n new line not this one is it ↵ ↵ ↵ carriage return arrow Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted November 21, 2008 Share Posted November 21, 2008 the character? it's a line break character... ^ like that ^ and that You can't see it, but you can get it with $lineBreak = "\n"; I don't know what you mean by "the database symbol" Quote Link to comment Share on other sites More sharing options...
redarrow Posted November 21, 2008 Author Share Posted November 21, 2008 So it hidden but there in the database entry...... so in essence mysql hides the ^ sign when a user press the enter button for the new line..... Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted November 21, 2008 Share Posted November 21, 2008 If you look at the entry you'll see "blah blah blah blah blah blah" there are 2 line break characters in there, you CAN see them by the fact that the lines are broken... "blah blah blahblah blah blah" ^ same string without the line breaks Now, when a browser renders HTML it ignores line breaks, so you have to make them into <br /> tags with nl2br() if you want them to display in a browser. Quote Link to comment Share on other sites More sharing options...
redarrow Posted November 21, 2008 Author Share Posted November 21, 2008 Thank you so much not said anywhere on the net well put cheers....... how a book should exsplain you learn nl2br() and why........ If you look at the entry you'll see "blah blah blah blah blah blah" there are 2 line break characters in there, you CAN see them by the fact that the lines are broken... "blah blah blahblah blah blah" ^ same string without the line breaks Now, when a browser renders HTML it ignores line breaks, so you have to make them into <br /> tags with nl2br() if you want them to display in a browser. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.