title: Passing parameters to Javascript using PHP
body: <p>I have the following line of code:</p>
  
  <pre><code>&lt;a href="javascript:;" onClick="tweeet('myid')"&gt;My Tweets!&lt;/a&gt;
  </code></pre>
  
  <p>Now while this is working perfectly fine the following line is not:</p>
  
  <pre><code>&lt;a href="javascript:;" onClick="tweeet(&lt;?php echo 'myid'; ?&gt;)"&gt;My Tweets!&lt;/a&gt; 
  </code></pre>
  
  <p>Can anyone help me out why it is not working and suggest any changes? The variable I want to pass to the Javascript function is a PHP variable. I have tried the PHP with single quotes and double quotes but it is not working.</p>