「中央」がどこにあるかを見つけて、divタグの終了タグと2番目のdivの開始タグを出力します。
<?
$rowcount = mysql_num_rows($recordset);
echo "<div id='div1'>";
$i = 0;
while ($d = mysql_fetch_object($recordset)) {
echo $d->somefield;
$i++;
if ($i == floor($rowcount / 2)) {
//we have reached the mid-point, let's close the first DIV
echo "</div><div id='div2'>";
}
}
echo "</div>";
?>