Meaning of "->"

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm studying some validation code and I can't figure out the meaning of
in the following context:
function addCheck($field){
    $this->mandatory[] = $field;

   function addCheckEmail($field){
    $this->mandatory_mail[] = $field;

I've spent a good amount of time trying to search for information or
similar code on it without success and unfortunately I've lost where I
got the code from; dumb move, I know!

   Is   "$this->mandatory[] "   simply a variable name?  There are
several variations in the code (  "$this->mandatory_whatever[]"  ), but
the format is strange to me, causing me to wonder if there is more to it
than "just a variable name".
   I've had no definitive luck sandboxing it either.

Thanks for any light you can shed for this rank newbie<g>,


Re: Meaning of "->"



Quoted text here. Click to load it

Start here:
-- =

Rik Wasmus
...spamrun finished

Re: Meaning of "->"

Twayne wrote:

Quoted text here. Click to load it

It's the object resolution operator. Please read the PHP manual, chapter
about OOP.

Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Delay not, Caesar.  Read it instantly.
                -- Shakespeare, "Julius Caesar" 3,1

Here is a letter, read it at your leisure.
                -- Shakespeare, "Merchant of Venice" 5,1

        [Quoted in "VMS Internals and Data Structures", V4.4, when
         referring to I/O system services.]

Re: Meaning of "->"

Quoted text here. Click to load it

Ahh, some words to use for searches!  Thanks Ivan, I think I looked
about everywhere but OOP.



Site Timeline