The newlines will be in the data. When you output it to a [X]HTML page, you'll either need to output it in something like a <pre> tag to maintain the exact formatting, or you can use the [man]nl2br/man function to convert the newlines into <br /> tags:
echo "<pre>".$row['text']."</pre>";
// ...or...
echo "<p>".nl2br($row['text'])."</p>";