Incomplete arrays passed from controller to view in Codeigniter

I have a Codeigniter application that is not receiving complete data in the view.

I have a report function in my controller that calls the model to create an array to pass to my view.

The array looks complete when I var_dump it in the model however it is truncated in the view is there a constraint or limit that I have not set or being imposed on the length of parameters?

Thank you

John
johnecollinsAsked:
Who is Participating?
 
Chris StanyonConnect With a Mentor Commented:
The table->generate() method takes an array or database result as an argument and produces the HTML for your table.  In your books model you have a method called getAll() which queries the database and then calls the table->generate() method. This creates the HTML for the table and returns it to your controller. You then assigns that to $data['table'];

In your view, the $table variable holds the HTML for the table. You are trying to call the table->generate() method again in the view, but this time you're passing in the already generated HTML, which is causing the error

If you want to display your table, then in your view just echo $table.
0
 
Loganathan NatarajanLAMP DeveloperCommented:
Can you post your code?
0
 
johnecollinsAuthor Commented:
Thanks Loganathan,

Here it comes ;-)
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
johnecollinsAuthor Commented:
Loganathan,

The Controller, the model, the view and the output

Looking at the output in the controller it doesn't display the array in full

But in the view it says Undefined table data ;-(

Thanks for looking

John
books.php
Books-model.php
books-main.php
The-output.docx
0
 
johnecollinsAuthor Commented:
Hi Chris,

Thanks very much for your effort, you couldn't pm your phone number could you  save me putting up questions ;-)

500 well earned points
Cheers

John
0
 
Chris StanyonCommented:
Thanks for the points :)

No go on the phone number - I don't always have the time to work on EE stuff, so by keeping it all within EE allows me to dip in and out when I have the time.

Besides, posting a question on here will get a good mix of experts to help you out.
0
 
johnecollinsAuthor Commented:
Chris,

Cheers but if you see me in a pub I'll happily buy you a pint of beer ;-)

Thanks a lot

John
0
 
Chris StanyonCommented:
Sounds good :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.