original_string: public function get_records_menu($table, array $conditions=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
          $menu = array();
          if ($records = $this->get_records($table, $conditions, $sort, $fields, $limitfrom, $limitnum)) {
              foreach ($records as $record) {
                  $record = (array)$record;
                  $key   = array_shift($record);
                  $value = array_shift($record);
                  $menu[$key] = $value;
              }
          }
          return $menu;
      }
code: public function get_records_menu($table, array $conditions=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
          $menu = array();
          if ($records = $this->get_records($table, $conditions, $sort, $fields, $limitfrom, $limitnum)) {
              foreach ($records as $record) {
                  $record = (array)$record;
                  $key   = array_shift($record);
                  $value = array_shift($record);
                  $menu[$key] = $value;
              }
          }
          return $menu;
      }
code_tokens: public function get_records_menu ( $ table , array $ conditions = null , $ sort = '' , $ fields = '*' , $ limitfrom = 0 , $ limitnum = 0 ) { $ menu = array ( ) ; if ( $ records = $ this -> get_records ( $ table , $ conditions , $ sort , $ fields , $ limitfrom , $ limitnum ) ) { foreach ( $ records as $ record ) { $ record = ( array ) $ record ; $ key = array_shift ( $ record ) ; $ value = array_shift ( $ record ) ; $ menu [ $ key ] = $ value ; } } return $ menu ; }
docstring: Get the first two columns from a number of records as an associative array where all the given conditions met.
  
  Arguments are like {@link function get_recordset}.
  
  If no errors occur the return value
  is an associative whose keys come from the first field of each record,
  and whose values are the corresponding second fields.
  False is returned if an error occurs.
  
  @param string $table the table to query.
  @param array $conditions optional array $fieldname=>requestedvalue with AND in between
  @param string $sort an order to sort the results in (optional, a valid SQL ORDER BY parameter).
  @param string $fields a comma separated list of fields to return - the number of fields should be 2!
  @param int $limitfrom return a subset of records, starting at this point (optional).
  @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
  @return array an associative array
  @throws dml_exception A DML specific exception is thrown for any errors.
docstring_tokens: Get the first two columns from a number of records as an associative array where all the given conditions met .