here is my version of fill_paragraphs, it will wrap at the first space before the 80th column of the incoming text and make it real nice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function fill_paragraphs($text) { set_time_limit(0); $break="\n"; $lines = explode("\n", $text); $lines_size = sizeof($lines); $i = 0; $wrap=80; while ($i < $lines_size) { if (strlen($lines[$i]) <= $wrap) { $result[] = $lines[$i]; $i++; } else { $wrap=80; while( ($wrap > 0 ) && (substr($lines[$i], $wrap,1) != " ") ){ $wrap--; } if ( $wrap == 0 ) {$wrap =80;} $result[] = substr($lines[$i], 0, $wrap); $lines[$i] = substr($lines[$i], $wrap + 1, strlen($lines[$i]) - $wrap); } } return implode($break, $result); } -- Incredible Networks LTD Angelos Karageorgiou 20 Karea st, +30.1.92.12.312 (voice) 116 36 Athens, Greece. +30.1.92.12.314 (fax) http://www.incredible.com angelos@incredible.com (e-mail)