You could put  "\n" where you want the new line.
Than if you want to output the text field in HTML you could  use nl2br() to
replace the new line characters with <br>
For example take a look at this INSERT query:
$sql= "INSERT INTO table_name (text_field,...other_fields) VALUES ('first
row\nsecond row',...other_values)";

Hope this helps
Dobromir Velev

-----Original Message-----
From: kmurrah <[EMAIL PROTECTED]>
Date: Monday, July 23, 2001 9:15 PM
Subject: [PHP-DB] line breaks in mySQL text fields

>How do I add new line characters to a text field in mySQL ?
>i.e. i need to manually insert "returns" into my text ...
>thanks in advance,
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to