protected function GetKey($index)
{
$k = array_keys($this->values[0]);
// this works around a strange bug - if you just return the key at $index,
// for a non-associative array it repeats some!
if (!$this->force_assoc && is_int($k[0])) {
return $index;
}
if (isset($k[$index])) {
$index = (string) $index;
$index = (int) $index;
return $k[$index];
}
return NULL;
}