Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
class Post extends CI_Model
{
public function getAll()
{
$query = $this->db->get('posts');
$posts = array();
foreach ($query->result_array() as $row) {
$posts[] = $row;
}
return $posts;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment