Results 1 to 4 of 4
Thread: Dynamic text wrapping.
Nov 24, 2004, 08:18 #1
- Join Date
- Jan 2004
- 0 Post(s)
- 0 Thread(s)
Dynamic text wrapping.
I am trying to do a dynamic text wrapping feature for my search results.
My "site_description" field is a VARCHAR in the DB with 200 chars.
What I need to have is to lines printed with no more than 70 chars per line and at the end put "...", like Google does.
The problem I am having is that my word wrap is cutting a word in half on the second line. So, I need to make this dynamic so that the second line always has complete words, this will mean that the two lines will not be the same lenght but it's ok.
what I have right now.
$wrap_description = wordwrap(substr($site_description,0,115)." ...", 64, "<br>");