title: How to process JS & PHP Script in Wordpress
body: <p><strong>Problem:</strong>
  The script listed below will only run if it's listed out on the page. If its enqueued then it fails. I assume this is because if its enqueued then the php is NOT processed, but I don't know enough to be sure.</p>
  
  <p><strong>Question</strong>
  Is there any way to call the script or is it just a fundamental requirement that any script containing php has to be listed on the page?</p>
  
  <p>Thanks</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {
  jQuery('#buttonLink').dialog({autoOpen: false});
  var readerStatus="&lt;?php echo $_COOKIE['readerStatus'];?&gt;";
  
  if (readerStatus=="tester")  
      {
      jQuery("#buttonLink").dialog('open');
      }
  });
  &lt;/script&gt;
  </code></pre>