1.

In PHP, which operator is used to access property of an object?(a) .(b) *(c) ->(d) @I have been asked this question in my homework.Question is from Putting PHP to Work topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer» RIGHT answer is (c) ->

For explanation I would say: If $a represents an object, the properties it has can be ACCESSED as $a->property-name. For INSTANCE, $a->white, $a->black, $a->BLUE, $a->red can be the properties of $a and accessed in this WAY.


Discussion

No Comment Found

Related InterviewSolutions