title: computing total price of shopping cart invoice
body: <p>In my code after users choose products and go to cart page, my cart page creates an html structure like this for  all  total prices of selected products:
  below here x indicates a number which is id of good that I fetch from Session, so every time these differ, also the number of fields changes  every time based on user's choice </p>
  
  <pre><code>&lt;span class="total-x"&gt; some value&lt;/span&gt;
  &lt;span class="total-x"&gt; some value&lt;/span&gt;
  &lt;span class="total-x"&gt; some value&lt;/span&gt;
  .
  .
  .
  .
  &lt;span class="total-x"&gt; some value&lt;/span&gt;
  </code></pre>
  
  <p>for example if  cart gets id=3 form session after some other codes, page creates a field like this:</p>
  
  <pre><code> &lt;span class="total-3"&gt; some value [has been computed]&lt;/span&gt;
  </code></pre>
  
  <p>I want to sum up value of those field and put in a field like this:</p>
  
  <pre><code>&lt;span id=total-all&gt; &lt;/span&gt; 
  </code></pre>
  
  <p>I ask for every which would lead me to over come this.</p>