title: Placeholder content for iframe
body: <p>I am wanting to automatically display content from my databse within an iframe as it acts as the body content which was submitted when creating the doc.</p>
  
  <p>I am trying to insert with a mix of JS Php like so:</p>
  
  <pre><code>&lt;iframe name="editor" id="editor" class="doc_body" &gt;&lt;/iframe&gt;&lt;/div&gt;
  
  &lt;script&gt; 
  var iframe = document.getElementById('editor'), 
  iframedoc = iframe.contentDocument || iframe.contentWindow.document; 
  iframedoc.body.innerHTML ="&lt;?php echo ($row[2]); ?&gt;"; 
  &lt;/script&gt; 
  </code></pre>
  
  <p>I know that I am indexing correctly because if I echo this out of the JS it will output the correct row.</p>
  
  <p>Unless the syntax is wrong above?</p>
  
  <p><strong>UPDATED</strong> </p>
  
  <p>so after some messing around it would appear that there is a conflict between this:</p>
  
  <pre><code>    &lt;?php    
  
  
      $q = "SELECT * FROM cats";
      $r = mysqli_query ($dbc, $q); // Run the query.
  
  
      // FETCH AND PRINT ALL THE RECORDS
      while ($row = mysqli_fetch_array($r)) {
      echo '&lt;ul&gt;&lt;li&gt;&lt;label&gt;&lt;input type="checkbox" &lt;?php if ($checked == 1) echo "checked"; name="cat_id[]" value="' . $row['cat_id'] . '"&gt; ' . $row["cat_name"] . '&lt;/label&gt;&lt;/li&gt;&lt;/ul&gt;';
      }
  
      ?&gt;
  </code></pre>
  
  <p>And the above, If I remove this above the content shows but if I include it - it takes it away?</p>