You are using a class property, you can check if it is available first. When accessing a class property after using $this you donโt need extra $ , just use $this - record . how
echo $this -> record[0] -> title;
If record is a valid property of the class, which is an array, and it still does not work. Try it too:
echo {$this -> record[0]} -> title;
Starx source share