<?php
class Admin extends AppModel{
public $name='Admin';
}
<?php
class AdminsController extends AppController {
public $name ='Admin';
public function index() {
$data = $this->Admin->find('all');
$this->set('data',$data);
}
}
V:
<h1>Form </h1>
<table>
<?php
for($i=0;$i<count($data);$i++){
$arr=$data[$i]['Admin'];
echo "<tr><td>{$arr['admin_id']}</td>";
echo "<td>{$arr['admin_password']}</td>";
echo "<td>{$arr['role_id']}</td></tr>";
}
?>
</table>