Welcome Guest, Not a member yet? Register   Sign In
Problem array in my view...
#2

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

I assume that's an error coming from your view -- which, coincidentally, you didn't post?

$data is not available within your view. The values are.

For example, with the following data variable:
Code:
$data = array(
    'user_id' => '151',
    'username' => 'thefuzzy0ne',
);

Within your view, you would have access to this data as $user_id and $username.

If you want to access the array itself, you'd need to load your view like this:
Code:
$this->load->view('listJob', array('data' => $data));

That way, the $data array is extracted into the global scope of the views.

For further information, please see http://php.net/manual/en/function.extract.php

A tip for the future: Please post the entire error message. It helps us to see where the error is, otherwise we have to waste time guessing, or worse yet, some people might not even bother to help you at all. Smile


Messages In This Thread
Problem array in my view... - by El Forum - 05-30-2013, 01:46 PM
Problem array in my view... - by El Forum - 05-30-2013, 02:59 PM
Problem array in my view... - by El Forum - 05-31-2013, 03:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB