physaux Posted October 11, 2009 Share Posted October 11, 2009 I have this code: $code = $this->generateCode($characters); what does it do?? I am trying to use it because i downloaded some sample code, but i keep googleing for "this->" and its not returning anything.. help! and ty! Link to comment https://forums.phpfreaks.com/topic/177319-solved-what-does-this-generatecodecharacters-do-help/ Share on other sites More sharing options...
.josh Posted October 11, 2009 Share Posted October 11, 2009 $this->somethinghere is a shorthand method for calling a property or method within a class. $this means "this class". Example: class blah { var $x; function foobar() { // you are telling php to assign 123 to $x in this class, which is blah. $this->x = 123; } } Link to comment https://forums.phpfreaks.com/topic/177319-solved-what-does-this-generatecodecharacters-do-help/#findComment-934898 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.