Welcome Guest, Not a member yet? Register   Sign In
Formatting of HTML: View or Controller
#1

[eluser]prezet[/eluser]
Hi

Just a general question, if I have an array of data, and I wanted out output this array in the form of an html unordered list as so:

Code:
$output = '';

foreach( $dataItems as $dataItem ){
   $output .= '<li>'.$dataItem.'</li>';
}

$output = '<ul>'.$output.'</ul>';

Should this type of formatting be done in the controller, and passed to the view, or done directly in the view??

Cheers


Messages In This Thread
Formatting of HTML: View or Controller - by El Forum - 09-25-2008, 07:17 AM
Formatting of HTML: View or Controller - by El Forum - 09-25-2008, 07:28 AM
Formatting of HTML: View or Controller - by El Forum - 09-25-2008, 07:40 AM
Formatting of HTML: View or Controller - by El Forum - 09-25-2008, 07:47 AM
Formatting of HTML: View or Controller - by El Forum - 09-25-2008, 02:32 PM
Formatting of HTML: View or Controller - by El Forum - 09-25-2008, 04:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB