luminous Posted March 22, 2010 Share Posted March 22, 2010 Just a quick one: I have a php class that has an array in it, how do i access the values of the array inside the object? I can't seem to get a result with either echo or print_r on: $this->$arrayName[0]; Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/196180-accessing-array-inside-object/ Share on other sites More sharing options...
Alex Posted March 22, 2010 Share Posted March 22, 2010 There's no $ in front of the variable name. Just: $this->arrayName[0]; Link to comment https://forums.phpfreaks.com/topic/196180-accessing-array-inside-object/#findComment-1030223 Share on other sites More sharing options...
luminous Posted March 22, 2010 Author Share Posted March 22, 2010 thankyou! Link to comment https://forums.phpfreaks.com/topic/196180-accessing-array-inside-object/#findComment-1030235 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.