Question and answer is powered by AnsPress.io
$str=”Hi /n Thanks for visiting /n see you soon./n welcome to our site”.
When I will show this text, It should show the line break where is new line syntax.Like this.
Hi
Thanks for visiting
see you soon.
welcome to our site.
PHP has a function name nl2br().
$str=”Hi /n Thanks for visiting /n see you soon./n welcome to our site”;
$result = nl2br($str); echo $result;
You will see your output.