Setting one variable equal to another will not change the original content... My guess is your line breaks are "\n" (whitespace) and not HTML breaks - so when you output it, they are ignored. Look at the nl2br function - this will add in <br /> with each new line.
Edit: alternatively, you can wrap your output in <pre> ... </pre> to retain whitespace.