I have code that gets some text from database and inserts it inside
var = <?php echo $var ?>
var = "This is first line
This is second
This is third..."
Just split the variable into new lines with whatever delimiter you like: