Getting SUM in PHP for a database value
<p>How could I get sum value in php file</p>

<pre><code>$a = mysql_query('SELECT d.name, d.idnumber, d.days FROM users d');
while($row = mysql_fetch_array($a))
{
   $idnumber = $row['idnumber'];
   $days     = $row['days'];
   echo $array_sum($days); 
}
</code></pre>

<p>I need to sum the variable that I got from database in php file, but not as SUM in the query. In my database I Have 3 rows i.e., 3, 10 and 1. So I need 14 as sum</p>
