[eluser]bretticus[/eluser]
[quote author="PHP Creative" date="1260681321"]How would I passing the following to the view from the controller?
Code:
$ans1[$i] = $row[2];
$ans2[$i] = $row[3];
$ans3[$i] = $row[4];
[/quote]
Like this...
Code:
$data['ans2'] = $ans2;
$data['ans3'] = $ans3;
$this->load->view('view_file', $data);
...but I think you are missing the point of CodeIgniter. I see nothing in your code that represents any of the framework goodies built into CI. For example, even though you don't need a model I suppose, you could load the query results from a model file (that actually uses framework conveniences like Active Record!) From there you can simply pass the resulting object to your view and iterate over the database records without using arrays to hold the information.
This post should probably be moved to Code...