PHP nl2br() Function Example Tutorial
This article will provide some of the most important example nl2br in php. Here you will learn php nl2br example. this example will help you php nl2br() function example. you'll learn php convert nl2br. Let's see bellow example php nl2br replace n to br.
nl2br() function will replace \n into newline. so let's see syntax and example
nl2br() function will take two argument. first as string and it's required. second as A boolean value that indicates whether or not to use xhtml compatible line breaks and it's optional.
$desc = "Line one \n Line two \n Line three \n Live four \n Line five ";
I hope it can help you...
We are Recommending you
- How to Add Text Watermark to Image in PHP?
- PHP implode() Function Example Tutorial
- PHP Subtract Month from Date Example
- How to Upgrade PHP Version from 7.4 to 8 in Ubuntu?
- PHP Curl Delete Request Example Code
- PHP Curl Request with Certificate (cert pem file option) Example
- Laravel PHP json_decode without quotes Example
- How to Remove Multiple Keys from PHP Array?
- How to Find Day Name from Specific Date in PHP?
- How to Remove Null Values from Array in PHP?