Jump to content

What does -> do?


notclive

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...