JustinB Posted March 14, 2008 Share Posted March 14, 2008 can someone explain what -> is and its meaning example $display->header(); Quote Link to comment Share on other sites More sharing options...
dotBz Posted March 14, 2008 Share Posted March 14, 2008 i guess it's used to identify a member variable or function of a class Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted March 14, 2008 Share Posted March 14, 2008 it is used to invoke a class function or to retrieve a public class variable. Quote Link to comment Share on other sites More sharing options...
Coreye Posted March 15, 2008 Share Posted March 15, 2008 can someone explain what -> is and its meaning example $display->header(); Read this thread: http://www.phpfreaks.com/forums/index.php/topic,95867.0.html. Quote Link to comment Share on other sites More sharing options...
Xeoncross Posted March 15, 2008 Share Posted March 15, 2008 $obj->method(); = a method call A method = a function of an object A object = a collection of methods/functions (among other things) <?php //A function function my_function { print 'hi'; } //Run function my_function(); //A class with a function (called a method) class my_object { function my_method() { print 'hi'; } } $obj = new my_object; //Run method object->my_method(); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.