Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] "Undefined Index" Issues and Problems
#1

[eluser]phused[/eluser]
I'm having trouble displaying certain data of an array, this is what my array is currently looking like:

Code:
Array ( [0] => stdClass Object ( [id] => 1 [wid] => 1 [name] => Homepage [date] => 0000-00-00 00:00:00 ) )

I'm trying to get the "name" value by using the following line of code in my view file:

Code:
echo $content[0]['name'];

The $content variable is passed from my controller to my view, this is what the code looks like:

Code:
$data = array(
                    'content' => $this->ConceptModel->get_concept($id),
                    'comments' => $this->ConceptModel->get_comments($id)
                    );
        
        $this->load->view('app/header', $header);
        $this->load->view('app/concept', $data);
        $this->load->view('app/footer');

When I load the page, it breaks and stop loading further as soon as it gets to the echo. Any idea why this could be occurring?


Messages In This Thread
[SOLVED] "Undefined Index" Issues and Problems - by El Forum - 05-25-2009, 07:26 AM
[SOLVED] "Undefined Index" Issues and Problems - by El Forum - 05-25-2009, 07:28 AM
[SOLVED] "Undefined Index" Issues and Problems - by El Forum - 05-25-2009, 07:31 AM
[SOLVED] "Undefined Index" Issues and Problems - by El Forum - 05-25-2009, 07:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB