How do I get the array to increment to the next row? I am making a table of labels 3 wide and ten high. The result that I am getting is three repeats in each row. How can I bump to the next row for each table cell.
$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;}
}}