Welcome Guest, Not a member yet? Register   Sign In
Clean up my view
#2

[eluser]Michael Wales[/eluser]
You kind of want that sort of stuff in your view.
I mean, you could add this into your controller, but it's going to suck trying to manage:

Code:
<?php foreach ($con_options->result() as $item) {
$data['sucky_large_block_to_echo'] .= '&lt;input type=\"checkbox\" name=\"parent_contact[]\" value=\"" . $item-&gt;contact . "\"><label for=\"" . $item->contact . "\">" . $item->contact . "</label><br />";
}

Then in your view:
Code:
&lt;?= $sucky_large_block_to_echo; ?&gt;

That's really abusing the system though and you may as well move to one large file, dropping the MVC framework altogether.


Messages In This Thread
Clean up my view - by El Forum - 08-21-2007, 04:57 AM
Clean up my view - by El Forum - 08-21-2007, 06:40 AM
Clean up my view - by El Forum - 08-21-2007, 06:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB