Most common line feed code php

Php code is recorded at line breaks writing

One,"</br>"

"<br/>"浏览器显示换行,源代码显示<br/>

Example:

<?php
echo "Test"."<br/>";
echo "one";
echo "<br/>";
?>

Browser output:
Here Insert Picture Description
browser source code output:
Here Insert Picture Description

two,"\n"

"\n"浏览器不显示换行,源代码显示换行

Example:

<?php
echo "Test"."\n";
echo "one";
echo "\n";
?>

The browser displays:
Here Insert Picture Description
Browser source code display:
Here Insert Picture Description
Reference:
https://blog.csdn.net/hero_xsx/article/details/81055355

Published 148 original articles · won praise 61 · views 60000 +

Guess you like

Origin blog.csdn.net/qq_41617034/article/details/105276427