Welcome Guest, Not a member yet? Register   Sign In
fill dropdown using ignited record
#2

[eluser]arjo[/eluser]
Thanks to my college Martijn, here's the answer:

Code:
function getDropDown() {
  $this->select('documenttype_ID, name');
  // get all records
  $records = $this->find_all();
  // empty array
  $data = array();
  
  // loop all records
  foreach($records as $record)
  {
    // fill data array
    $data[$record->documenttype_ID] = $record->name;
  }

  return $data;
}


Messages In This Thread
fill dropdown using ignited record - by El Forum - 06-24-2009, 05:46 AM
fill dropdown using ignited record - by El Forum - 06-24-2009, 09:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB