title: Problem escaping php variable
body: <p>I'm having trouble escaping the PHP variable inside the getItems function:</p>
  
  <pre><code>while($row = mysql_fetch_array( $data )) 
      {
      echo "&lt;div class='favorite'&gt;";
      echo "&lt;div style='display: inline;'&gt;".$row['Item']."&lt;/div&gt;";
          if ($row['UID'] = $uid) {
          echo "&lt;div id='unlock'&gt;Info&lt;/div&gt;";
          } else {
          echo "&lt;div id='unlock' onclick='getItems('".$row['Item']."')'&gt;Unlock&lt;/div&gt;";
          }
      echo "&lt;/div&gt;";
      }
  </code></pre>
  
  <p>When rendered (is render the word?) anyway, when I see it on my site it says:</p>
  
  <pre><code>onclick="getItems(" whatever')'
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>You can see the code here:
  <a href="http://www.chusmix.com/game/insert/get-items.php?user=19" rel="nofollow">http://www.chusmix.com/game/insert/get-items.php?user=19</a></p>