Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Model_mahasiswa extends CI_Model {
- Function getdata ()(
- $url = "http://10.11.4.34/mahasiswa/index_get?nama="._GET["nama"];
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
- curl_setopt($ch,CURLOPT_URL,$url);
- $result=curl_exec($ch);
- curl_close($ch);
- var_dump(json_decode($result,true)); ---------> buat decode datanya
- $key = $result; ---> buat tammpung hasil bener ga ?
- Foreach($key as $hasil => $value) { ----------> buat looping , tapi masih invalid foreach
- $ret[$h] = trim($value);
- }
- )
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement