Nasıl bir sonraki satıra artırmak için dizi alabilirim? Ben 3 genişliğinde ve on yüksek etiketlerin bir tablo yapıyorum. Ben alıyorum sonucu her satırda üç tekrarlanmaktadır. Nasıl her tablo hücresi için bir sonraki satıra çarpmak.
$i =0;
for ($i = 1; $i <= 3; ++$i){
while($row = mysql_fetch_array($result)){
$company = $row['company'];
$comp_strt = $row['comp_strt'];
$comp_city = $row['comp_city'];
$comp_state = $row['comp_state'];
$comp_zip = $row['comp_zip'];
$celldata= $company."<br>".$comp_strt."<br>".$comp_city.", ".$comp_state." ".$comp_zip;
if($i = 1){echo "<tr style='row-height: 5em;'><td>'".$celldata."'</td>";}
if($i = 2){echo "<td>'".$celldata."'</td>";}
if($i = 3){echo "<td>'".$celldata."'</td></tr>"; $i = 1;}
}}