Confusion with MVC in CI |
[eluser]mddd[/eluser]
You can't name a controller function 'view' if you are using PHP4. Check the manual page on reserved names.
[eluser]ChaosKnight[/eluser]
It still happened after I changed the function to display()... And I still couldn't figure out why the database result threw away the country element of the array... Can someone see why? Edit: fixed the function part, now it's only the database object...
[eluser]ChaosKnight[/eluser]
Changed my code to this... Model: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Controller: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Don't know how efficient it is, there may be better suggestions, but it got the page working for me :-) The view is basic: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> |
Welcome Guest, Not a member yet? Register Sign In |