Remove the new lines from output?
Remove the duplicates from the result set
Explode your records using this
Add quotes to each record
Character used between records
Use Tags to wrap your records. EX : <strong>
Add a new line after x amount
Wrap your intervals with tags