title: Include PHP inside JavaScript (.js) files
body: <p>I have a JavaScript file (extension <code>.js</code>, not <code>.html</code>) containing several JavaScript functions.</p>
  
  <p>I want to call one of the PHP functions in a PHP file containing only several PHP functions from within one of the JavaScript functions.</p>
  
  <ul>
  <li>Is that possible?</li>
  <li>Would I need to "include" the <code>.php</code> file containing the PHP function in the <code>.js</code> file?</li>
  <li>How would I do that? <br /> For example, say I had a file called myLib.php containing a function called <code>myFunc</code> that takes two parameters (<code>param1</code> and <code>param2</code>). Then I have a <code>.js</code> file containing a function called <code>myJsFunc</code>.  How would a call the <code>myFunc</code> (PHP) from within the <code>myJsFunc</code> (JavaScript function)?  Wouldn't I need to include the PHP file somehow in the <code>.js</code> file?</li>
  </ul>