php br does not wrap because the
tag acts as a line break in the browser, but does not play a line break role in the source code; then you need to use the \nline break operation in the source code. Operate the source code.
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
php br Why not wrap the line? manage? ?
In the line wrapping operation of php, the difference between \n and
Blogger, I encountered a situation today, which is that in php The \n newline operator was written in the code, thinking that the output presented in the browser would be a newline, but unexpectedly it was not. The code and results are as follows:
<?php $name="haha"; echo "hi,$name"; echo "\n"; echo 'hi,$name'; ?>
If the middle newline operator is changed to
, the result presented by the browser will be newline, as follows As shown in the picture:
Why does this result occur? Let's analyze it from the source code. Right-click on the Firefox browser to view the page source code. We will find that in the first case above, there will be branches in the source code, as shown in the figure:
In the second case above, there is no line break except for a
tag. The result is as shown in the figure:
PHP Video Tutorial"
The above is the detailed content of What should I do if php br does not wrap the line?. For more information, please follow other related articles on the PHP Chinese website!