Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "config.php";
- $data=array();
- $cek_kode=mysqli_query($konek, "select content_title, input_date, content_desc from content where is_news = 1");
- $cek=mysqli_num_rows($cek_kode);
- if ($cek_kode==0){
- echo "Tidak ada koleksi";
- }
- else
- {
- while ($hasil=mysqli_fetch_array($cek_kode, MYSQLI_ASSOC))
- {
- $row=[];
- foreach($hasil as $nm=>$val) $row[$nm]= trim($val);
- $data[]=$hasil;
- $data[]=$row
- }
- die(json_encode())($data);
- }
- ?>
Add Comment
Please, Sign In to add comment