Calling a javascript function while coding in PHP : <p>I am trying to get a variable from my javascript function while I'm coding in PHP. </p>

<p>my javascript which is included in the page:</p>

<pre><code>function subAmt(empid, subid){
    return 4;
}
</code></pre>

<p>my attempt to call that function:</p>

<pre><code>$amt = echo "subAmt(3,5);" ;
</code></pre>
