You fetch your data in view like this.
$errors
Whatever you put in $data
variable array and you pass $data variable to view, is "converted" in a such way that every element (index) is a variable in view.
So in controller we have $data['news'] = array(); $data['errors'] = array();
But in views we have only 2 variables that we can work with $news
and $errors
.
please make adjustment to your code as follows
$data['post'] = $this->post->get_post($postID);
var_dump($data['post']);
$this->load->view('register_user.php', $data);
and in view
foreach ($post as $result)...