Jump to content

[SOLVED] echo \n


freebsdntu

Recommended Posts

Hi,

 

Im glad to help you, and you should take away your "\n" thats why it is appearing, just leave it:

echo 'Hello World!'

 

Im glad for helping you,

 

if i had solved your problem, mark this thread as solved please

Thank you for your help, but the problem is not solved, i have a series of echo statements, if I remove \n, then there won't be carriage returns.

Link to comment
https://forums.phpfreaks.com/topic/82901-solved-echo-n/#findComment-421613
Share on other sites

the main reason is that you need double quotes to evaluate the caharacters.  if you user "hello world \n"  that will work because it will pringt a new line isntead of a "\" and a "n"

 

gdlk

This sounds rationale, but what if I do it like this : 'Hello Word"\n"', it still does not work.

I guess I need to check with the escape characters. Since I would have "" symbols inside "" of echo

Link to comment
https://forums.phpfreaks.com/topic/82901-solved-echo-n/#findComment-421615
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.