title: DataTables warning: Non-table node initialisation (TBODY). PHP
body: <p>I'm trying to use <a href="https://www.datatables.net/" rel="nofollow">DataTables</a> second time in other PHP Page but I'm stock in this error,</p>
  
  <blockquote>
    <p>DataTables warning: Non-table node initialisation (TBODY).</p>
  </blockquote>
  
  <p>What did i do wrong? i tried this code with my first PHP Page and its working fine.</p>
  
  <p>Here is my Code for Table</p>
  
  <pre><code>&lt;table class="table table-striped table-hover "&gt;
            &lt;div class="row"&gt;
                &lt;div class="col-lg-12"&gt;
                    &lt;div class="page-header"&gt;
                        &lt;h1 id="tables"&gt;Admin's Accounts&lt;/h1&gt;
                    &lt;/div&gt;
                        &lt;button type="button" class="btn btn-danger" data-toggle="modal" data-target="#modal"&gt;&lt;i class="zmdi zmdi-plus-circle zmdi-hc-2x"&gt;&lt;/i&gt;&lt;/button&gt;
                        &lt;table class="table table-striped table-hover "&gt;
                            &lt;thead&gt;
                                &lt;tr&gt;
                                    &lt;th&gt;#&lt;/th&gt;
                                    &lt;th&gt;Name&lt;/th&gt;
                                    &lt;th&gt;Contact&lt;/th&gt;
                                    &lt;th&gt;Email Address&lt;/th&gt;
                                    &lt;th&gt;Position&lt;/th&gt;
                                    &lt;th&gt;Option&lt;/th&gt;
                                &lt;/tr&gt;
                            &lt;/thead&gt;
                            &lt;tbody id="admin"&gt;
                                    &lt;?php
                              //set up mysql connection
                              mysql_connect("localhost", "root", "") or die(mysql_error());
                              //select database
                              mysql_select_db("brm_dbs") or die(mysql_error());
                                      //select all records form tblmember table
                                      $query = 'SELECT uid,name,contact,email,position FROM admin ORDER BY created_at DESC';
                                      //execute the query using mysql_query
                                      $result = mysql_query($query);
                                     //then using while loop, it will display all the records inside the table
                                      while ($row = mysql_fetch_array($result)) {
                                          echo ' &lt;tr&gt; ';
                                          echo ' &lt;td&gt; ';
                                          echo $row['uid'];
                                          echo ' &lt;td&gt; ';
                                          echo $row['name'];
                                          echo ' &lt;td&gt; ';
                                          echo $row['contact'];
                                          echo ' &lt;td&gt; ';
                                          echo $row['email'];
                                          echo ' &lt;td&gt; ';
                                          echo $row['position'];
                                          echo '&lt;td&gt;';
                                          echo '&lt;button type="button" class="btn btn-link" data-toggle="modal" data-target="#myModal'.$row['uid'].'"&gt;&lt;i class="zmdi zmdi-plus-circle zmdi-hc-2x"&gt;&lt;/i&gt;&lt;/button&gt;';
                                      }
                                ?&gt;
                            &lt;/tbody&gt;
                    &lt;/table&gt; 
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;/table&gt; 
  </code></pre>
  
  <p>And I'm using this for JQUERY</p>
  
  <pre><code>&lt;script src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdn.datatables.net/1.10.9/js/dataTables.bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
           $(document).ready(function() {
               $('#admin').DataTable( {
                   "lengthMenu": [[5, 10, 25, -1], [5, 10, 25, "All"]]
               });
           } );
      &lt;/script&gt;
  </code></pre>