I'm having some problem in displaying long varchar retrieved from database on the interface.

When the text is very long, it causes the interface to stretch horizontally to display the whole text.

I've tried to use text field to display them. It can restrict the display of text in the field, but it looked a bit weird and not really nice to display text.

Is there any way to properly display the long text without affecting the interface?

Thanks in advance. Have a nice day:)

8 Years
Discussion Span
Last Post by lcyew

Depending on the browser but your best bet is to use a div tag and use css to set the width of the div tag. Let me know how it goes.


or else u can just specify the amount of words you want par line with 'wordwrap()' like below -

$wordParLine = 10;
wordwrap($string', $wordParLine);

Hi guys...

Omnix, sorry for not trying your way, because i don't quite get what you mean by that. But thanks anyway.

network18, I've tried the wordwrap function and it's working. Thanks.

Thanks for suggesting solutions..it's greatly appreciated...Nice day ^_^

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.