Welcome Guest, Not a member yet? Register   Sign In
Problem with invalid constant in VIEW
#1

[eluser]Ivan Augusto[/eluser]
Hello, i need assistance =]~

I created this Controller:

Code:
class Projects extends Controller {

    function Projects()
    {
        parent::Controller();    
    }
    
    function index()
    {
        $data['title'] = "Projects";
        $data['projects'] = $this->db->get('projects');
        
        $this->load->view('projects',$data);
    }
}
And this view:

Code:
<html>
<head>
<title><?=title?></title>
</head>
<body>
<table border="1">
    &lt;? foreach ($projects as $project) : ?&gt;
    <tr>
        <td>&lt;?=$project->id?&gt;</td>
        <td>&lt;?=project->name?&gt;</td>
    </tr>
    &lt;? endforeach; ?&gt;
</table>
&lt;/body&gt;
&lt;/body&gt;
&lt;/html&gt;
but I get this message:

Quote:A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant titulo - assumed 'title'
Filename: views/projetos.php

HELP ME PLEASE ;D~

Thks 4all ;]~


Messages In This Thread
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:24 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:32 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:39 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:41 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:44 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:45 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:45 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:47 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 03:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB