Reputation: 63
I would like to change codeigniter set_flashdata() function to become an array it is it possible ?
the normal function like that: $this->session->set_flashdata('error', 'there is an error');
I need to be like that $this->session->set_flashdata(array('error'=>'there is an error'),'Description'=>'all fields required');
If it possible how to echo it on view? and if not what you can suggest ? thank you!
Upvotes: 0
Views: 58
Reputation: 63
resolved:
$this->session->set_flashdata('error', array('error'=>'lock', 'msg'=>'lock'));
view:
$ero=$this->session->userdata['error']['error'];
$msg=$this->session->userdata['error']['msg'];
Upvotes: 1