How to wrap line in php

silencement
Release: 2023-02-25 07:00:01
Original
7980 people have browsed it

How to wrap line in php

When writing PHP script code, we often see the two characters \n and
. They both have the function of breaking lines, so what exactly do they mean? What's the difference?

1.\n is to make the source code wrap, but the content displayed by the browser is not;

2.
is to make the content displayed by the browser wrap, but the source The code does not wrap.

For example, PHP code 1:

<?php
 
echo 0;
 
echo "\n";
 
echo 1;
 
?>
Copy after login

For example

<?php
echo 0;
echo "<br />";
echo 1;
 
?>
Copy after login

Okay, this is the difference between \n and
, I hope it will be helpful to you Everyone is helpful.

The above is the detailed content of How to wrap line in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template