title: Calling PHP Function within Javascript
body: <p>I want to know is it possible to call a php function within javascript, only and only when a condition is true. For example</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  if (foo==bar)
  {
  phpFunction(); call the php function
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Is there any means of doing this.. If so let me know. Thanks</p>