$q = "SELECT * FROM $table";
$result = $this->db->query($q)->result();
return $result;
di view
untuk stdclass
<td><?php echo $v->nama_kota ?></td>
$q = "SELECT * FROM $table";
// $result = $this->db->query($q)->result_array();
return $result;
untuk object array
di view
<td><?php echo $v['nama_kota'] ?></td>
Langganan:
Posting Komentar (Atom)
0 Response to "perbedaan result() dan result_array()"
Posting Komentar