escape sequences are not working in php -


if im not wrong \n representation means newline <br> .but when use <br> or tags work escape sequences.

example

echo "write somethings<br>"; echo "about coding"; 

above example works fine when try use escape sequences none of them not working

echo "write something\n"; echo "about coding"; 

it's example newline character , other escaping characters dont work \n.what real logic on case?

\n , other similar escape sequences not part of html. should use html escape sequences. these can found here: http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php

so <br> tag works \n not


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -