<?php

$array = array( "第一個値" , "第二個値" , "第三個値" , "第四個値"
 , "第五個値" , "第六個値" , "第七個値" , "第八個值"
, "第九個値" , "第十個値" , "第十一個値" , "第十二個值");


$tmp='';
$tmp.='<table>'."\n";
$count=0;
for($j=0;$j<3;$j++){
	$tmp.='<td>';
	for($i=0;$i<4;$i++){
		$tmp.='<td>'.$array[$count].'</td>';
		$count=$count+1;
	}
	$tmp.='</td>'."\n";
}
$tmp.='</table>'."\n";

echo $tmp;