title: Getting a PHP variable in jQuery
body: <p>So I have this:</p>
  <pre><code>&lt;?php
   echo '
    &lt;script&gt;
  $(function(){
     $(&quot;a#yeah&quot;).click(function(){
             $.ajax({
          url: &quot;ajax.php?action=yeah&amp;id='.$id.'&quot;,
          success: function(html){
           $(&quot;a#yeah&quot;).html(&quot;your cool&quot;)
                     }
       })
     })
  
  
  })&lt;/script&gt;';
  
  ?&gt;
  </code></pre>
  <p>basically I am using the PHP variable $id which can be find in the document, how could I get this same variable but without echoing the jQuery(so I could keep my editor syntax highlight in the JavaScript part)?</p>