cheosman Posted August 1, 2007 Share Posted August 1, 2007 i'm new in programming i've been download some php scripts but i don't understand this.. if(!$session->isAdmin()){ what is "->" mean? PLEASE HELP... Quote Link to comment https://forums.phpfreaks.com/topic/62772-php-novice/ Share on other sites More sharing options...
trq Posted August 1, 2007 Share Posted August 1, 2007 This part... $session->isAdmin() Calls the isAdmin method belonging to the $session object. The -> is a way to reference methods and properties belonging to the defined object. Quote Link to comment https://forums.phpfreaks.com/topic/62772-php-novice/#findComment-312544 Share on other sites More sharing options...
Foser Posted August 1, 2007 Share Posted August 1, 2007 take a look in the construction of OO PHP... Above that you should have like: <?php $session = new object_name(input info); //then there is a function called is admin apparently, so its saying... with the object name info form the function isadmin from the OO script ?> that is why there is -> learn the beguiner guide about functions, then start going into OOP since if you have no or little knowledge about functions than OOP isn't for you now. Quote Link to comment https://forums.phpfreaks.com/topic/62772-php-novice/#findComment-312546 Share on other sites More sharing options...
Cobby Posted August 25, 2007 Share Posted August 25, 2007 I had trouble with this when I first started OOP as well. I recommend you watch the three Classes & Objects videos at www.sampsonresume.com Cheers, Cobby Quote Link to comment https://forums.phpfreaks.com/topic/62772-php-novice/#findComment-333708 Share on other sites More sharing options...
matthewhaworth Posted August 26, 2007 Share Posted August 26, 2007 I hate to do this, but please read the FAQ/Code Snippet Repository before posting here: http://www.phpfreaks.com/forums/index.php/topic,95867.0.html Quote Link to comment https://forums.phpfreaks.com/topic/62772-php-novice/#findComment-334201 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.