$config = $db->get_row($sql);

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidshq
Forum Newbie
Posts: 12
Joined: Mon May 05, 2008 10:47 pm
Location: Pennsylvania

$config = $db->get_row($sql);

Post by davidshq »

What does -> mean? I get that $config is a variable being set equal to $db? But does -> mean like an action is taking place? If someone could point me to some docs. on this or an explanation, it would be appreciated.
Dave.
shaneiadt
Forum Newbie
Posts: 10
Joined: Sat Mar 15, 2008 9:26 pm

Re: $config = $db->get_row($sql);

Post by shaneiadt »

I can't find anything on php.net at first glance, but the "->" operator is used when dealing with objects, assessing object variables and methods. Take a look at the link below if you like :)

http://ie2.php.net/zend-engine-2.php

P.S. the code in question, $db -> get_row($sql); is invoking the get_row() method defined in the $db object type. Not sure if this is what you were asking for or not!
davidshq
Forum Newbie
Posts: 12
Joined: Mon May 05, 2008 10:47 pm
Location: Pennsylvania

Re: $config = $db->get_row($sql);

Post by davidshq »

yes, exactly what i was looking for. thx!
dave.
Post Reply