title: call a javascript from php and store the return in a variable
body: <p>I am wondering if there is any way to call a javascrip function from php and store the return value of the function in php variable.</p>
  
  <p>Something like: </p>
  
  <pre><code>&lt;?php
    var p = test("something");
    echo p;
  ?&gt;
  &lt;script&gt;
   function test(elm){
       return elm+" anotherthing";
   }
  &lt;/script&gt;
  </code></pre>