title: Use a JavaScript Function Parameter in PHP
body: <p>i'm creating a function like this :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function DoSomething(var Var1)
  {
    &lt;?php
      echo Var1; //This will probably not work.
    ?&gt;
      //Note : Not using the echo command originally , using fopen , fputs &amp; fclose at the real one... Because the real function is long i won't put it.
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Note : I saw the possible duplicates and didn't get my answer...</strong></p>
  
  <p>What is the best solution ?</p>
  
  <p>Thanks for your attention.</p>
  
  <p><strong>Note II : Please don't set this as a duplicate of irrelevant posts...
  This Post is not about differences between server-side and client-side languages !</strong></p>