@Jeff_Mott is absolutely correct.
It may also be helpful to know that the nl2br
function doesn’t actually convert a newline character to a <br>
. It simply inserts the <br>
characters into the string (prior to the newline character), leaving the newline character intact (helpful to know especially e.g. when output is to be interpreted as a javascript string).