I want to pass a zend_form_select with contents from a table. Right
now I'm doing something like
public function retrieveDistrictsForSelect() {
$select = $this->select()->from( 'districts' );
$select->order( 'school_district_name' );
$stm = $select->query();
$rows = $stm->fetchAll();
if( is_array( $rows ) && count( $rows ) > 0 ) {
foreach( $rows as $row ) {
$district[$row['id']] =
$row['school_district_name'];
}
}
return $district;
}
Then passing it into the setMultiOptions of the select element. I was
wondering if there was some better way to pass in Db_Table object?
MS