从Drupal 7中的对象属性创建一个数组,php

I'm creating this form with checkboxes that I want to populate from a database. The problem is, how do I create an array of key=>value pairs when the data I need to create the pairs is in an object? I'm not sure I'm explaining myself properly, heres' the code and hopefully it will be clearer:

function myform_form($form, &$form_state) {
  $options_query = db_query('SELECT name, mname FROM event_type');
  $options = array();
  foreach($options_query as $o) {
    $options(($o->mname) => ($o->name));  //This is where I get the error unexpected T_DOUBLE_ARROW
  }
  $form['options'] = array(
    '#type' => 'checkboxes', 
    '#title' => t('Search options'),
    '#options' => $options,
    '#description' => t('Choose what you want.'),
 );

Is there a way to do this?

Try changing:

  $options(($o->mname) => ($o->name)); 

to

 $options[$o->mname] = $o->name;