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
Are you using a particular framework or have you rolled your own? Zend Framework for instance would be like this.
db = $db;
}
public function index() {
$this->view->data = $this->db->query("SELECT * FROM nt_user"));
}
}
And then in the view
data);
This will give you the array dump that you have in your post. I'm not going to do the looping and displaying stuff though, I'm sure you can work that out yourself.