title: return json string with html characters?
body: <p>i want to call a php with jquery ajax to perform some database things and then return 2 lists of links. so i have to pass these two link lists back to jquery so it can display list 1 in the left side of the webpage and list 2 in the right side.</p>
  
  <p>i created the lists in separate arrays that i send back to jquery with json_encode but i noticed that it escapes all the html characters.</p>
  
  <pre><code>&lt;a&gt;dog&lt;/a&gt; became &lt;a&gt;dog&lt;\/a&gt;
  </code></pre>
  
  <p>so when i displayed the list in the html they werent links anymore.</p>
  
  <p>how can i preserve the html codes in my returned arrays to jquery?</p>
  
  <p>EDIT: is this the right way to go if you want to split up data from php so that jquery can display them in different locations in html?</p>
  
  <pre><code>// list 1
  while($row = mysqli_fetch_assoc($saved_tags))
  {
      $display_saved_tags[] = "&lt;a id='showtag' href='answer.php?id=" . $row['id'] . "'&gt;" . $row['name'] . "&lt;/a&gt;&lt;br /&gt;";
  }
  
  // list 2
  while($row = mysqli_fetch_assoc($related_tags))
  {
      $display_related_tags[] = "&lt;a id='showtag' href='answer.php?id=" . $row['id'] . "'&gt;" . $row['name'] . "&lt;/a&gt;&lt;br /&gt;";
  }
  
  // return lists to jquery
  echo json_encode('display_saved_tags' =&gt; $display_saved_tags, 'display_related_tags' =&gt; $display_related_tags));
  </code></pre>