Skip to content

Instantly share code, notes, and snippets.

@erkurn
Forked from anonymous/data.php
Last active December 25, 2015 13:20
Show Gist options
  • Select an option

  • Save erkurn/cd2f2a151c29f5305659 to your computer and use it in GitHub Desktop.

Select an option

Save erkurn/cd2f2a151c29f5305659 to your computer and use it in GitHub Desktop.
<?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);
}
}
?>
<?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;
}
}
?>
<!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