Advertisement
Guest User

Untitled

a guest
Sep 18th, 2018
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2.     $data = mysqli_fetch_all($result, MYSQLI_ASSOC);
  3. ?>
  4.  
  5. <table id="table">
  6.     <thead>
  7.         <tr>
  8.             <th>
  9.                 <td>1</td>
  10.                 <td>2</td>
  11.                 <td>3</td>
  12.             </th>
  13.         </tr>
  14.     </thead>
  15. </table>
  16.  
  17. <script type="text/javascript">
  18.     $('#table').DataTable({
  19.         data: <?=json_encode($data);?>
  20.     });
  21. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement