render the values of controllers to view
<p>I am newbie to class and objects.Here I am making an application for invoice.So for the controllers as in the frameworks  I have taken them as handlers.So for the UserHandler
I have made this query:</p>

<pre><code>&lt;?php
class UserHandler {
  public $db;
  public function __construct($db) {
    $this-&gt;db = $db;
  }
  public function index() {
    print_r($this-&gt;db-&gt;query("SELECT * FROM nt_user"));
  }
 }
</code></pre>

<p>It is showing result in array as I want like that.</p>

<pre><code>Array ( [0] =&gt; 1 [id] =&gt; 1 [1] =&gt; xyz [name] =&gt; xyz [2] =&gt; 5d6305f2 [password] =&gt; 5d6305f2 [3] =&gt; 2011-05-24 14:59:17 [created_at] =&gt; 2011-05-24 14:59:17 [4] =&gt; 2011-05-24 14:59:17 [updated_at] =&gt; 2011-05-24 14:59:17 ) 
</code></pre>

<p>Now I want to show that result in a view template.As view template is another file how to render all the values of handlers to the view.
I want the view page show like this:</p>

<pre><code>name:
Password:
</code></pre>

<p>just like the login box.So please tell me how to do that?</p>
