-3

I am developing web application the data in the database is like this

"
10 Functions 
 Touch Control  
LCD display  
 Electric programmer with:  
Minute minder, 
automatic start  
Automatic end of cooking
End cooking acoustic alarm
Additional Menu programmes: 
Showroom mode  Limited power 
consumption mode  
ECOlogic (nominal power < 2.3 kW) 
Locking function (Child safety lock)
Electronic temperature control 
Rapid pre-heating  
Temperature range: 30-280 °C  
Large 72 litres cavity (+ 35% volume) 
5 cooking levels "

As you see the data in the DB is formatted each one in a line when i get the data from the DB using php and echo it it appear all as a paragraph not each data in a line ...and i want the data to be echoed like the above format what should i do?

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • `echo "

    $line

    ";` ?
    – Aitch Mar 16 '15 at 23:54
  • That data looks like it needs cleaning: lines 1, 2 and a couple of others are not actually product features, and so perhaps should not be rendered as if they were. As Riggs says, it would be better stored as one feature per row, in a foreign table. – halfer Mar 17 '15 at 00:11

1 Answers1

0

I have to say that your data is not stored in a very useful/sensible way, but if it truly has a newline at the end of every line then you need to convert newline's into something that HTML understands, like <br> tags.

So try this

echo nl2br($database_column_value);
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149