5Feb/081

How to force a wrap in an html table with PHP.

Let's say you have a long url that's blowing out the width of your small table, don't look to html or css to solve this problem. Use wordwrap function.

$title =  $myrow["title"];
$newtitle = wordwrap($title, 28, "<br/>", 1);

Thank you Amadeus at dreamincode.net

This also starts my new blogging approach. I had to read through 5 long discussion threads which included flame wars on the html spec before I got to this golden data nugget. The approach is simple. If it takes me longer then it should to track something down, I'll take my original Google search, make it into a new blog title and post the answer that worked for my situation. It will surly help someone in a future.

Comments (1) Trackbacks (0)
  1. Weeeee, what a quick and easy sotliuon.


Leave a comment


No trackbacks yet.