I’m storing my database values in a PHP file as follows:
$select->from(apartment,array('idapartment'));
$select->where('apartment.idowner = ?',$usersession->arrvar['idowner']);
$stmt = $select->query();
$result = $stmt->fetchAll();
$this->view->$rows = $options;
Now I want to use this in a dropdown in a phtml file .Can anyone help me achieve this?
This is assuming that you are fetching the results as an associative array. If you are fetching them as an object, use
$row->idapartmentinstead of$row['idapartment']