[eluser]Charles Garrison[/eluser]
My understanding of the MVC design would indicate that you do not want to do the processing in the view. I would probably build the html table in the controller and pass the it to the view as a string.
A couple of other suggestions:
- The "print" keyword is a bit slower than "echo" because it returns a value, FYI.
- It's a good idea to test your query results like this:
Code:
if ($query->num_rows() > 0) {
foreach ($query->result() as $row) {
//statements here...
}
}
else {
//statements here...
}