A little help for a newbie |
[eluser]A_funs[/eluser]
ok So I have this code in my controller, and I know $thisdat is defined, it is an array of arrays if I print_r() it. Code: $query = $this->db->get('meta'); However, I get an error when loading the view: Quote:A PHP Error was encountered this is my view code: Code: <?php Any help or guidance would be very much appreciated, thanks!
[eluser]fcxxff[/eluser]
You should do this: Code: $query = $this->db->get('meta'); Code: <?php
[eluser]A_funs[/eluser]
Hey Thanks, that worked, could you give me a little explanation as to why what you did works though? As opposed to what I had been doing before?
[eluser]fcxxff[/eluser]
Grab the link: http://ellislab.com/codeigniter/user-gui...views.html Theres everything about it. Good luck!
[eluser]CroNiX[/eluser]
The array that gets passed to the view must be an associative array as CI will extract() that array into variables in the view so you can access its keys using $key. Code: $data['thisdat'] = 'This data'; ...In view Code: echo $thisdat; //outputs 'This data' |
Welcome Guest, Not a member yet? Register Sign In |