Why does this work

```
foreach ($items as $i) {
    $dataTitle = $this->dataTitle;
    $title = $i->$dataTitle;
}

```

when this doesn't?

```
foreach ($items as $i) {
    $title = $i->$this->dataTitle;
}

```

Is there a better way to do this?