I was thinking something along the lines of
<?
$string = 'aaa <br><br><br> bbb <br><br><br> ccc <br><br><br> ddd <br>';
$pos1 = strpos($string, '<br><br><br>');
$pos2 = strpos($string, '<br><br><br>', $pos1 + 12);
$pos3 = strpos($string, '<br><br><br>', $pos2 + 12);
if($pos3)
{
$string2 = substr($string, 0, $pos3) . '</td><td align="right">' . substr($string, $pos3+12);
}
?>
had only php4 available on local testserver (don't really use php), so strpos instead of stripos. it's not a beauty, but it should get the job done.