Advertisement
MarsHall_ID

Array

Feb 21st, 2020
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. include "conn.php";
  5. $sql = "SELECT * FROM Code_Nuklir";
  6.  
  7. $query = mysql_query($sql);
  8. while($dt=mysql_fetch_array($query)){
  9.     $item = array (
  10.         "genre"=>$dt["genre"],
  11.         "title"=>$dt["title"],
  12.         "code"=>$dt["code"],
  13.         "description"=>$dt["description"]
  14.         );
  15. }
  16. $json = array(
  17.     'result' => 'Success',
  18.     'item' => $item
  19.     );
  20.  
  21. $d = mysql_fetch_array($query);
  22. print_r($d);
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement