Textarea problem

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Post by Redcircle » Wed Feb 12, 2003 5:31 pm

use the function nl2br() in the output.

example

echo nl2br($row['body');

What this function does is change all new line chars (\n) to an html <br>

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Post by Redcircle » Wed Feb 12, 2003 5:53 pm

put the output within a table with a fixed width

<table width="100"><tr><td>blah blah blah....</td></tr></table>

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Post by Redcircle » Wed Feb 12, 2003 6:11 pm

if it were a normal sentence with spaces between the characters it would contrain it within the 100

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest