kura2yamato

perbaikan 115

Oct 20th, 2020
574
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include "config.php";
  3.  
  4. $data = array();
  5.  
  6. $cek_kode = mysqli_query($konek, "select content_title, input_date, content_desc from content where is_news = 1");
  7.  
  8. $cek = mysqli_num_rows($cek_kode);
  9. if ($cek_kode == 0)
  10. {
  11.     echo "Tidak ada koleksi";
  12. }
  13. else
  14. {
  15.     while ($hasil = mysqli_fetch_array($cek_kode, MYSQLI_ASSOC))
  16.     {
  17.         $row = [];
  18.         foreach ($hasil as $nm => $val)
  19.         {
  20.             $row[$nm] = utf8_encode ( $val );
  21.         }
  22.         $data[] = $row;
  23.  
  24.     }
  25.     die(json_encode($data));
  26. }
  27. ?>
  28.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×