Skip to content

Instantly share code, notes, and snippets.

@willmendesneto
Created February 24, 2013 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willmendesneto/5026026 to your computer and use it in GitHub Desktop.
Save willmendesneto/5026026 to your computer and use it in GitHub Desktop.
<?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