<?php $i="1"; foreach( $form->arealist as $key =>$place ){ ?>
<?php if($i=="1"){ print "<tr>";} ?>
<td><input name="area[<?php print $key; ?>]" type="checkbox" value="<?php print $key; ?>"
<?php print(($form->coverarealist[$key] == 'checked')||($form->coverarealist[99] =='checked')) ? 'checked' : ''; ?>/></td>
<td width="70"><?php print($place)? $place->getDot_region_nm():"" ?></td>
<?php if($i=="4"){ print "</tr>"; $i="0";} ?>
<?php $i++; } ?>
方法2:$i%4=="0"来实现换行!