Welcome Guest, Not a member yet? Register   Sign In
Nested data arrays in CI views - howto access?
#3

[eluser]smilie[/eluser]
Yes, as n0xie pointed out, when passing data to view CI assumes it is an array. So you will have to send it as array to your view as stated here above.

Also, you can do this as well:
Code:
# Controller
$data['info'] = "something";
$data['error'] = "Oh no, error!";

$this->load->view('news', $data);

# view
echo $info; # shows: something
echo $error; # shows: Oh no, error!

Regards,
Smilie


Messages In This Thread
Nested data arrays in CI views - howto access? - by El Forum - 09-08-2010, 05:50 AM
Nested data arrays in CI views - howto access? - by El Forum - 09-08-2010, 05:55 AM
Nested data arrays in CI views - howto access? - by El Forum - 09-08-2010, 09:36 AM
Nested data arrays in CI views - howto access? - by El Forum - 09-09-2010, 12:27 AM
Nested data arrays in CI views - howto access? - by El Forum - 09-09-2010, 12:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB