Created
          February 2, 2019 03:49 
        
      - 
      
- 
        Save Whatdapep/2ea14cfdea99937f469b30b2618a806d to your computer and use it in GitHub Desktop. 
Revisions
- 
        Whatdapep created this gist Feb 2, 2019 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ <?php header("content-type:text/javascript;charset=utf-8"); include("config.php"); //$sql = $conn->qurey("SELECT * FROM tb_test"); $sql = "SELECT * FROM tb_mem"; $result = mysqli_query($conn,$sql); if (mysqli_num_rows($result) > 0) { // output data of each row //$reponse = "tb_test"; while($row = mysqli_fetch_array($result)) { $tb_mem = array(); $tb_mem["mem_id"] = $row["mem_id"]; $tb_mem["mem_name"] = $row["mem_name"]; $tb_mem["mem_lastname"] = $row["mem_lastname"]; $tb_mem["age"] = $row["age"]; $reponse["tb_mem"]=array(); array_push($reponse,$tb_mem); // echo $member["mem_id"]; // echo $row["mem_name"]; // echo $row["mem_company"]; } } else { echo "0 results"; } echo json_encode($reponse); ?>