I have a PHP script which retrieves the contents of a raw / plain-text file and I'd like to output this raw text in HTML, however when it's outputted in HTML all the line breaks don't exist anymore. Is there some sort of PHP function or some other workaround that will make this possible?
For example, if the raw text file had this text:
hello
my name is
When outputted in HTML, it will say:
hello my name is
Is there any way to preserve these line breaks in HTML? Thank you.
(If it helps, my script gets the contents of the raw text file, puts it inside a variable, and I just echo out the variable.)