I fetched text from database in the table <td> I found all the text appear in single line I want to break it. I using PHP.

Recommended Answers

All 3 Replies

You need to use a CSS rule to restrict the area: td { width: 200px; } Add a class if you want to limit that rule only to some td . Otherwise you can use the tag pre .

If this is not what you need, please give more information, post an example of the code used and the output expected.

It sounds like you may have a whitespace issue.. try setting the css white-space to normal. Like this

td {
white-space: normal;
}

Do you mean something like this:

while ($row=mysql_fetch_assoc($result)) {
echo $row['column'];
echo "\n"; //must be double quote
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.