-
-
Save erkurn/cd2f2a151c29f5305659 to your computer and use it in GitHub Desktop.
This 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 characters
| <?php | |
| class data extends CI_controller{ | |
| public function __construct(){ | |
| parent::__construct(); | |
| $this->load->model('m_daftar'); | |
| } | |
| public function daftar(){ | |
| $isi['semuadata'] = $this->m_daftar->ambildata(); | |
| $this->load->view('template', $isi); | |
| } | |
| } | |
| ?> |
This 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 characters
| <?php | |
| class m_daftar extends CI_model{ | |
| public function __construct(){ | |
| parent::__construct(); | |
| } | |
| public function ambildata(){ | |
| $isi = array( | |
| 'norek'=>'1994', | |
| 'nama'=>'rere', | |
| 'alamat'=>'jatira', | |
| 'saldo'=>'10000', | |
| ); | |
| return $isi; | |
| } | |
| } | |
| ?> |
This 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 characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Judul</title> | |
| <link rel="styilesheet" href=""> | |
| </head> | |
| <body> | |
| <?php print_r($semuadata); ?> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment