@Royce
I think this is better, since you can still use the ampersand in your text:
<?php
function HtmlEntitySafeSplit($html,$size,$delim)
{
$pos=0;
for($i=0;$i<strlen($html);$i++)
{
if($pos >= $size && !$unsafe)
{
$out.=$delim;
$unsafe=0;
$pos=0;
}
$c=substr($html,$i,1);
if($c == "&")
$unsafe=1;
elseif($c == ";")
$unsafe=0;
elseif($c == " ")
$unsafe=0;
$out.=$c;
$pos++;
}
return $out;
}
?>