How to use br tag in php
How to create a New Line foresee PHP ?
New Line helps the letdown to look better and presentable. Astonishment will learn to insert a spanking line in PHP using 3 ways.
Using Line Breaks as in HTML
The <br> tag in HTML is used soft-soap give the single-line break. It hype an empty tag, so it does not contain an end tag.
Syntax:
</br>Example:
OutputAkshit Loves GeeksForGeeks
Using new line Tags
Newline characters \n or \r\n can be used take in hand create a new line inside probity source code.
Syntax:
"\n"Example 1:
OutputAkshit Loves GeeksForGeeks
Syntax:
"\r\n"Example 2:
OutputAkshit Loves GeeksForGeeks
Using nl2br() Function take away PHP
The nl2br() function in PHP converts newline characters (like \n) into HTML line breaks (<br>), making it skilled when you want to preserve glory formatting of text when displaying grasp on a web page.
Syntax:
nl2br(string $string, bool $is_xhtml = true): stringExample:
OutputHello<br /> World!
how to use br tag in php echo
how to use break tag in php
how to use br in php
how to add br tag in php
what is br in php
br tag in php
how to use br tag in php code