One way would be to put all the links into an array. Then do:
// assume $links is the array
$numPerCol = ceil(count($links) / 3);
$columns = array_chunk($links, $numPerCol);
foreach($columns as $col)
{
echo "<ul class='links'>\n";
foreach($col as $link)
{
echo "<li>$link</li>\n";
}
echo "</ul>\n";
}
You can then style the "links" class (or whatever else you'd prefer to call it) in your CSS style sheet, probably making it "float: left;" along with whatever other margin/padding stuff you want to apply to it. Or if you want to be old-fashioned about it, you could use a table and make the ULelements TD elements, instead (and get rid of the LI tags).