Hello,
I would like for my function to return .. an array of objects.. but it's not doing it.. it's only returning one. I want it to print... all in the statement.
if ($c == 'delete') {
if (!isset($this->this->post['submit'])) {
$result = $this->db->query("SELECT * FROM {$this->pre}categories");
while ($cat_set = $this->db->nqfetch($result)) {
$cat = $cat_set['cat_id'];
$name[$cat] = $cat_set['cat_name'];
$cat_list[$cat] = eval($this->template('ADMIN_CATEGORY_DELETE_OPTIONS'));
}
return eval($this->template('ADMIN_CATEGORY_DELETE'));
}
}
The templates are as such (They are database templates, in a function I have. It works.. )
ADMIN_CATEGORY_DELETE_OPTIONS
<option name="{$name[$cat]}">{$name[$cat]}</option>
ADMIN_CATEGORY_DELETE
<select name="cat_name">
I don't even really know how to ask about this. I just know, it is 'supposed' to produce ADMIN_CATEGORY_DELETE_OPTIONS for each instance.. but it's only showing one.