title: Sum Numbers with using for loop in PHP
body: <p>I want to sum numbers using for loop in PHP.</p>
  
  <p>like:<strong><code>'1+2+3+4+5+6+7+8+9+10=?'</code></strong></p>
  
  <p>this will be done using</p>
  
  <pre><code>&lt;?php
  
           $start = 1;
           $end = 10;
  
           $sum = 0;
           for ($i = $start; $i &lt;= $end; $i++) {
                       $sum += $i;
            }
  
            echo "Sum from " . $start . " to " . $end . " = " . $sum; 
  ?&gt;
  </code></pre>
  
  <p>The output is: -Sum from 1 to 10 = 55.</p>
  
  <p>But I want to output like this:</p>
  
  <p><strong>1+2+3+4+5+6+7+8+9+10=55</strong></p>
  
  <p>How can I achieve this?</p>