Hey, everyone. I don't quite understand why the array I declared as a public
class member is accessible from within the class' constructor but not from any
other method within the class. The program I'm making involves storing Album
objects (generated black squares) within an albumContainer object.
Every time I run the code I get the following message:
Fatal error: Uncaught Error: Using $this when not in object context in
C:\xampp\htdocs\Web
Development\charts4all.com\subpages\classes\albumContainer.php:26 Stack
trace: #0 C:\xampp\htdocs\Web
Development\charts4all.com\subpages\home.php(11): albumContainer::render()
#1 C:\xampp\htdocs\Web Development\charts4all.com\index.php(42):
include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\Web
Development\charts4all.com\subpages\classes\albumContainer.php on line
26