linebreak from MYSQL

admin

Administrator
Staff member
Hi

Can anyone help me with this problem.
I would like to make the line breaks <BR/> in the text i write, but is it best to do this when INSERT INTO or when SELECT FROM
databasetable.
I have tried to type them in manualy when writing text, with <BR/> but this is tiresome, is there anyway that the breaks i make when writing the text also can get out when i pull it out of the mysql database.

Below is the script i use to insert and pull out the content,

mysql_query("INSERT INTO news(headline,date,text,writer,source,writeemail,country)
VALUES ('$headline',now(),'$text','$writer','$source','$writeemail','$country')");

$resultat=mysql_query("select id,headline,date,text,writer,source,writeemail,country FROM news WHERE id=$id");
$new=mysql_fetch_array($resultat);

<?php Print ($new[text]);?>


Tanza
 
Back
Top