Some one can tell me ?
Posted: Wed Sep 12, 2007 5:00 am
What we call this in PHP
where should we use this And When We use this ?
Code: Select all
-->Code: Select all
DOMNodelist->item()A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
-->Code: Select all
DOMNodelist->item()Few search, fewer still would know what to search for as "->" isn't possible to search for. And myharshdesigner, I need to remind you of another rule.... I grow tired of reminding you of these rules.superdezign wrote:We should turn one of these '->' posts into a sticky.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Code: Select all
->feyd wrote:Few search, fewer still would know what to search for as "->" isn't possible to search for. And myharshdesigner, I need to remind you of another rule.... I grow tired of reminding you of these rules.superdezign wrote:We should turn one of these '->' posts into a sticky.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
THANKSMaugrim_The_Reaper wrote:It's just an object delimiter. If have a class User you create a new object by calling:
$user = new User();
The $user object, an instance of User, needs a syntax to refer to all the properties and methods it contains. That operator is ->. So to perhaps set a User name, one could:
$user->setName('Me!');
This tells we're calling the setName() method of the $user object. The main exception is if a method or property is static, i.e. you don't need to create an object to use it. So one could create a global User name (assuming a static method exists!) using the different :: syntax.
User::setName('Me!');
The manual explains all this in more detail on the Object Oriented introduction for PHP5.