title: implementing math operation in smarty
body: <p>I am trying to calculate total amount in smarty . My HTML codes are below :</p>
  
  <pre><code>{foreach name = feach item = k from = $res}
      &lt;p&gt;
      Date : {$k-&gt;booking_date}&lt;br /&gt;
      Price : {$k-&gt;price}
      {* $prc=$k-&gt;price, $seats=$k-&gt;number_of_seats *}
  
      Balance :{math equation="x * y" x=$prc y=$seats} &lt;br /&gt;
      &lt;span id="paid{$k-&gt;booking_id}"&gt;
          &lt;input type="button" onclick="makePaid('{$k-&gt;booking_id}')" value="PAID" /&gt;
      &lt;/span&gt;    
      &lt;/p&gt;
  {/foreach}
  </code></pre>
  
  <p>But it is showing warning message saying <code>Warning: Smarty error: math: parameter x is empty in C:\..</code>. Where I am doing wrong?</p>