final total method PHP result
<p>I'm currently trying to create a final total method using PHP. So far I keep getting this error for the following code:</p>

<p>Notice: Undefined variable: finalTotal</p>

<p>The method does work and the final amount is calculated however I am not sure how to define the $finalTotal variable so no errors turn up. Any tips would be appreciated.</p>

<p>Here is the code</p>

<pre><code>     $tot1=$row['productvalue']*$value; 

                       $finalTotal +=$tot1;
                     }
    echo $finalTotal;
</code></pre>

<p>Any tips are appreciated</p>
