SharkBait Posted August 23, 2010 Share Posted August 23, 2010 For some reason I cannot think today. <?php class { function meh() { $blah = $this->profile(); echo $blah->weirdname; } function profile() { // this is where I'm stuck.. // how do I properly set weirdname? } } ?> It's been a while since I've played with classes (been doing other things) so how do I set up the function profile() to return a value for weirdname. Link to comment https://forums.phpfreaks.com/topic/211551-brain-fart/ Share on other sites More sharing options...
Alex Posted August 23, 2010 Share Posted August 23, 2010 The profile() method would have to return an object that has a public property named weirdname. Link to comment https://forums.phpfreaks.com/topic/211551-brain-fart/#findComment-1102879 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.