title: How to sum the value of each rows and colum of html table
body: <p>I make a table like this code:</p>
  
  <pre><code>$righe = $_REQUEST['c'];
  $colonne = $_REQUEST['c2'];
  $somma = 0;
  echo"&lt;table width='200' border='1'&gt;";
  
  for($a=1;$a&lt;=$righe;$a++)
  {
      echo"&lt;tr bgcolor='#0099FF'&gt;";
  
      for($b=1;$b&lt;=$colonne;$b++)
      {   
          $somma++;
          $totale = $somma;
          echo"&lt;td&gt;&lt;input type='text' name='' size='8' value =" .$totale. " /&gt;&lt;/td&gt;";
      }
  
  echo"&lt;/tr&gt;";
  }
  
  echo"&lt;/table&gt;";
  </code></pre>
  
  <p>Now i want display the sum of each rows and column of the html table.
  For example I chose a matrix of: 5*5 so i have:<br></p>
  
  <pre><code>  1   2   3   4   5   
    6   7   8   9  10
   11  12  13  14  15
   16  17  18  19  20
   21  22  23  24  25
  </code></pre>
  
  <p><br>
  I want display to the left of each row and in each column the appropriate sum, such as:</p>
  
  <p><code>row(1) =&gt; 15, row(2) =&gt; 40, row(3) =&gt; 65</code> and so on..
  <code>column(1) =&gt; 55 , column(2) =&gt; 60</code> and so on..
  <br>
  How to make this?</p>