Sunday, 21 June 2020

new line starts php

  1. <?php  
  2.     echo nl2br("New line will start from here\n in this string\r\n on the browser window");  
  3. ?>  



New line will start from here
in this string
on the browser window



  1. <?php  
  2.     echo "One line after\n another line";  
  3.     echo " One line after\r\n another line";  
  4. ?>  
One line after another line One line after another line

No comments:

Post a Comment