Jump to content

special characters don't work (\n, \t, ...)


Dergam

Recommended Posts

It doesn't work because you're looking at it with a browser, which anticipates HTML.  \n is meaningless to a browser (at least, in terms of what it renders to the screen).  Your normal white space characters won't work.  Instead, use <br />, the HTML tag for a line break.

Link to comment
Share on other sites

Note that your thread title fell into the classic trap of new programmers.  You said "special characters don't work."  That's not the problem.  The problem is "I don't see special characters when I expect to see them."  The problem is that you're viewing your output incorrectly (in a browser, rather than plain text), not anything to do with PHP.  Make sure you define the question properly, it may help you understand a way to fix it on your own.

Link to comment
Share on other sites

Dergam, I wasn't attempting to scold you.  The phrasing lead me to assume something about the way you were thinking about the problem.  If you were thinking incorrectly, it would be good for you to think a different way so you could easily solve the problems.

 

Good that you got it working, and keep at it!  you're welcome here.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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