• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.