notclive Posted May 31, 2007 Share Posted May 31, 2007 I keep seeing $variable -> something in source code, what does the -> do? I can't search for it because google and php.net ignore - and > Link to comment Share on other sites More sharing options...
justsomeguy Posted May 31, 2007 Share Posted May 31, 2007 That is the operator to reference a member of a class. If you have a class called Door, and you have an object of the class called $obj, and you want to reference the knob property of the Door object, you would do this:$obj->knobA real-world example would be a database class, with a query member:$db->query($sql_statement);Check here for more about classes:http://www.php.net/manual/en/language.oop5.php Link to comment Share on other sites More sharing options...
notclive Posted May 31, 2007 Author Share Posted May 31, 2007 thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.