-2

私はPHPが初めてです。私は、他の人々の仕事から一緒にパッチを当てたビットとコードの断片から偶然の一致 (IC) 計算機を作ろうとしています。テーブルに投稿される部分を除いて、すべて正常に機能しています。私はそれが50後に新しい細胞を作るのを止めたい. 何か助けてください。

テーブルを書き込むコードは次のとおりです。

<?php
  if ( $showTable ) {
    // display tabulated values
    echo "<table class=\"trans\" width=\"1000\" border=\"1\" cellpadding=\"0\">"; 
    for ( $i = 1; $i < 50; $i++ ) {
         echo "<tr>"; 
         for ($c=0; $c <$cols; $c++) 
         {
         echo "<td>"; 
         echo($cells.': '.round($history[$i+$c], 3));
         $cells++;
         echo "</td>"; 
         }
    }
    echo "</tr>";
     $i += $c; 
  }
     echo "</table>";  
?>
4

1 に答える 1

1

私があなたのことを正しく理解していれば、

<?php
  if ( $showTable ) {
    // display tabulated values
    echo "<table class=\"trans\" width=\"1000\" border=\"1\" cellpadding=\"0\">"; 

    for ( $i = 1; $i < 50; $i++ ) { // 50 rows will be created
    echo "<tr>";      
         for ($c=0; $c <50; $c++) // each row will contain 50 <td>
         {
         echo "<td>"; 
         echo($cells.': '.round($history[$i+$c], 3));
         $cells++;
         echo "</td>";
         $i += $c;
         }
     echo "</tr>";    
    }


  }
     echo "</table>";  
?>
于 2012-11-05T06:43:39.690 に答える