• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 04:24 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:32 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:39 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:41 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:44 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:45 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:45 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:47 PM
Problem with invalid constant in VIEW - by El Forum - 05-02-2009, 04:52 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.