Saturday, 15 February 2014

javascript - how to echo data as it is in the DB the same format? -


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

  " 10 Functions Touch Control with LCD Display Electric Programmer: Automatic, Automatic End of Cooking: Automatic End-of-the-line Cooking Acoustic Alarm Extra Menu Program: Showroom Mode Limited Power Consumption Mode EcoLogic (Nominal Power & Lt; 2.3 KW) Locking Function ( Child Safety Lock) Electronic Temperature Control Rapid Pre-Heating Temperature Range: 30-280 ° C Large 72 liters cavity (+ 35% volume) 5 cooking level " 

As you see The data in DB is formatted each one in a row when I get the data from the db php and it resonates so it does not appear in each row as a paragraph ... and I want to Not that the data should look like the above format should I?

I must say that your data has not been stored in very useful / sensible air, But if at the end of every line it is actually a new line, then you have to convert some of Newline's things that understand HTML, like & lt; Br> tag

then try this

  resonance nl2br ($ database_column_value);  

No comments:

Post a Comment