Re: awful newbie question

From: Date: Mon, 13 Oct 2003 09:20:51 +0000
Subject: Re: awful newbie question
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-165942@lists.php.net to get a copy of this message
It is called Paamayim Nekudotayim ;) and is explaned here: http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php Paul Freedman wrote:
Marek - Thanks for your help. Unfortunately, my ignorance is more extensive than I had believed. In your reply, ... echo 'Q::qzml() ... what is the signifigance of '::'? I've only thought of such a figure as expressing a ratio. - Paul ----- Original Message ----- From: "Marek Kilimajer" <kilimajer@webglobe.sk> To: "Paul Freedman" <paul@freedmania.com> Cc: <php-general@lists.php.net> Sent: Sunday, October 12, 2003 1:09 PM Subject: Re: [PHP] awful newbie question
Paul Freedman wrote:
I'm one of the ignorant multitude beginning to grope their way across
the threshhold of web programming. I come from another world, not computer science, and thus have a question so basic I haven't found any reference to it anywhere. It's killing me.
In the php statement $q->qzml(); what is the symbol '->' called? What does it mean?
It calls *member* function of object $q. So even if qzml is a global function it will not work, the function must be defined in the object's class definition: class Q { function qzml() { echo 'Q::qzml() function<br>'; } } $q=new Q; $q->qzml();
A php script with this line in it, in which $q is an object and qzml()
is a function, returns the error message "undefined function". When I remove this line, the function qzml() is recognized.
I have also come across the symbol '=>'. I assume it is not the same
symbol. What is it, and what does it mean?
It is used to assign values to keys in array() construct: http://sk.php.net/manual/en/function.array.php
Any help would be greatly appreciated. Thanks, -Paul
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#165942) next »