how can I modify this script to add instead of incrementing
<pre><code>&lt;?php
  $aDoor = $_POST['formDoor'];
  if(empty($aDoor)) 
  {
    echo("You didn't select any buildings.");
  } 
  else 
  {
    $N = count($aDoor);

    echo("You selected $N door(s): ");
    for($i=0; $i &lt; $N; $i++)
    {
      echo($aDoor[$i] . " ");
    }
  }
?&gt;
</code></pre>

<p>The script above will increment and then echo the extracted values of the variable array $aDoor, How can I modify to sum the values instead?</p>
