code: public function setKey($key)
    {
      $this->key=$key;
      $this->is_assoc=(is_null($this->key) ? false : true);
    }
docs: Assign a key to the list.
  If you do this before calling fetchData() then
  this list will become associative.
  
  The key should be the name of a property
  
  @param string $key