Can someone quickly help me out with CodeIgniter's syntax. I need to access an array I stored in the session's userdata and I cant figure out the proper syntax.
<?php echo $this->session->userdata['user_session']['first_name']; ?>
gives me this error:
Fatal error: Cannot use object of type stdClass as array
All of the answers given in this Question dont work: Access array variable in session (CodeIgniter)
var_dump($this->session->userdata);and read the error message carefully (you will wonder but it's output so that you could read it)