title: Cannot echo longtext field using jquery
body: <p>I am running a php mysql query to pull data, and for part of the code I am trying to echo a longtext data field, shown here as the <code>$companystory</code> variable, using jquery:</p>
  
  <pre><code>    $quicksearch = "(SELECT * FROM companies WHERE 
      company='$itemclass')";
      $query = mysql_query($quicksearch) or die(mysql_error())
      while($companydetails=mysql_fetch_array($query)){
      $companystory = $companydetails['company_story'];
      echo "
      &lt;script&gt;
      // Replace paragraph with text from $companystory
      $('.details p').html('Here are details on the company: $companystory');
      &lt;/script&gt;
      ";
      echo $companystory;}
  </code></pre>
  
  <p>Echoing the value the first time seems to break the code, however echoing it the second time displays it on the page, but not where I need it to display (Replacing the .details paragraph).</p>
  
  <p>Also, removing the $companystory from the below line, like this:</p>
  
  <pre><code>$('.details p').html('Here are details on the company:');
  </code></pre>
  
  <p>Replaces the text, but obviously without the <code>$companystory</code> longtext.</p>
  
  <p>Any ideas? </p>