title: php while $count, want to add all the result
body: <p>Im facing some issue on counting total number of output.</p>
  
  <pre><code>&lt;?php
  $count = 1;
  while ($count &lt;= 10)
  {
  echo "$count ";
  ++$count;
  }
  ?&gt;
  </code></pre>
  
  <p><strong>Result output</strong></p>
  
  <pre><code>1 2 3 4 5 6 7 8 9 10
  </code></pre>
  
  <p>so what i want is to add all the result that is </p>
  
  <pre><code>1+2+3+4+5+6+7+8+9+10 = ?  in my same code?
  </code></pre>