I tried to access with $this->$arrDataName[$key] on the element with the key $key from the array $this->$arrDataName. But PHP in
$this->$arrDataName[$key]
$key
$this->$arrDataName
Let's assume your array is $this->arrDataName. You have a $key, so your object would be $this->arrDataName[$key].
$this->arrDataName
$this->arrDataName[$key]
If you want the contents of the variable which name is stored in $this->arrDataName[$key] you should do this:
arrDataName[$key]}; ?>