print the newline

Ads
 

print the newline

Why doesn?t the following code print the newline properly?

<?php $str = ?Hello, there.\nHow are you?\nThanks for visiting.?; print $str; ?>
View Answers

December 29, 2010 at 4:10 PM

Hi friends,

Inside the single quotes \n (newline) is not worked as new line, just as a sequence of two characters - \ and n.

Thanks.

Ads









Related Tutorials/Questions & Answers:
print the newline
print the newline  Why doesn?t the following code print the newline properly? <?php $str = ?Hello, there.\nHow are you?\nThanks for visiting.?; print $str; ?>   Hi friends, Inside the single quotes \n (newline
print without newline in python
print without newline in python  Hi, I have a Python program... the print it in one line. My example: print("I ") print("Love ") print("Python") But the output is coming in new lines. I want to know how to print without
Advertisements
print without newline in python
print without newline in python  Hi, I have a Python program... the print it in one line. My example: print("I ") print("Love ") print("Python") But the output is coming in new lines. I want to know how to print without
how to print dot in python without newline
how to print dot in python without newline  Hi, I a debugging python program and I am using following code to print dots: print("................") I want to print pre-defined number of dots for testing purpose
how to print dot in python without newline
how to print dot in python without newline  Hi, I a debugging python program and I am using following code to print dots: print("................") I want to print pre-defined number of dots for testing purpose
python replace newline with space
python replace newline with space  Hi, I want to replace newline character \n With space in python. How to replace newline with space in python? Thanks   Hi, Its easy in python. You can use the replace method
python replace newline with space
python replace newline with space  Hi, I want to replace newline character \n With space in python. How to replace newline with space in python? Thanks   Hi, Its easy in python. You can use the replace method
ModuleNotFoundError: No module named 'flake8-class-newline'
ModuleNotFoundError: No module named 'flake8-class-newline'  Hi...: No module named 'flake8-class-newline' How to remove the ModuleNotFoundError: No module named 'flake8-class-newline' error? Thanks   Hi
print
print  How to print JFrame All Componant?   Please visit the following link: http://www.roseindia.net/java/example/java/swing/Print.shtml
Java write newline
Java write newline       Following example demonstrates,  how to get newline feature... of abstract writer class. In the example newLine feature is brought using
Print
into the stream and, as opposed to print() method, gets you to the new line after the text
how can i remove newline characters and tabs
how can i remove newline characters and tabs   how can i remove newline characters and tabs ? but i wont to using GUI .please help
ModuleNotFoundError: No module named 'print_print'
ModuleNotFoundError: No module named 'print_print'  Hi, My Python... 'print_print' How to remove the ModuleNotFoundError: No module named 'print_print' error? Thanks   Hi, In your python environment
print a form of *
print a form of *   * *** ***** ******* ********* ******* ***** *** *   Post the format properly
Print Button
Print Button  i want the source code for printing details of jform.. so plz help me for source code of print button
print numbers
print numbers  1234 123 12 1234   1234 123 12 1234
Print the document
Print the document  I tried to print web page.I am using the below...() { var printWindow = window.open('test', 'Print Window', 'height=600,width...;Print Window</title>'); printWindow.document.write('</head>
Print the document
Print the document  I tried to print web page.I am using the below...() { var printWindow = window.open('test', 'Print Window', 'height=600,width...;Print Window</title>'); printWindow.document.write('</head>
date print
date print  how can i print the date in jsp page in the following formate month-date-year. (example. march 8 2012
date print
date print  how can i print the date in jsp page in the following formate month-date-year. (example. march 8 2012
print the sequence
print the sequence  how can I write the code by using for loop to produce this following statement: 10,9,8,7,6,5,4,3,2,1,buzz! please, help me
diamond print
diamond print   print the pattern 1 2 3 4 5 6 7 8 9 10 11 12
should print in console
should print in console  
To print initials
To print initials  import java.util.Scanner; class initials { String a ; int e ; char f ; int b ; int c ; char d; Scanner sc = new Scanner(System.in); void main
Print command
Print command  Can I use System.out.println command in Struts form bean or Struts action class. I am using Struts 1.3.8 but when I write this command. It does not work. Please reply me as soon as possible. Thanks.   
print form information when click on print button
print form information when click on print button   Sir,I desingn institute webside using jsp and strut by using platform netbean 7.2.So request you please help for printing form information by clickin print button after submit
print square of any number
print square of any number  using c++ language, write aprogram to print the square of any number entered by the user
how to print the server time
how to print the server time  how to print the server time in jsp and update time in fix interval
ModuleNotFoundError: No module named 'print'
ModuleNotFoundError: No module named 'print'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'print' How to remove the ModuleNotFoundError: No module named 'print'
ModuleNotFoundError: No module named 'print_it'
ModuleNotFoundError: No module named 'print_it'  Hi, My Python... 'print_it' How to remove the ModuleNotFoundError: No module named 'print... to install padas library. You can install print_it python with following
How to print this Format exactly?
How to print this Format exactly?   * * * & reverse

Ads