The "echo" command in PHP sends the output to the browser as raw html so even if in double quotes the browser will not parse it into two lines because a newline character in HTML means nothing. That's why you need to either use:
echo [output text]."<br>";
when using "echo", or instead use fwrite...
fwrite([output text]."\n");
This will output HTML newline in place of "\n".