Welcome Guest, Not a member yet? Register   Sign In
how to pass flashdata as data inside a view that will be returned as data
#1

my view implementation is such that all my views are passed as data to rendered on a general template. however sometimes i also need to pass data inside these views that are to be returned as views.

for example

PHP Code:
public function myview()
{
  $_SESSION['error] = 'this is an error';
  $this->session->mark_as_flash('
error');
  
  //creating the view
  //this is the page that will be passed as data
  $page_content['
content'] = $this->$this->load->view('example-folder/example-page', $example-data, TRUE);
  
  //this is the template layout page
  $this->load->view('
nurse/home', $page_data);

My question is how do i pass the flashdata to be rendered in the $page_content['content']?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB