How do I add a line break to a string that is output by PHP?

just add <br />in this way.

\n is only working with echo or nl2br() method.

but when we need to break line in print_r() we use<br/>this way and it works.

i create example for you, please check.
https://www.awesomescreenshot.com/image/23177408?init_open=true