You are here: Re: newb question « PHP Programming Language « IT news, forums, messages
Re: newb question

Posted by Treefrog on 05/11/06 10:53

fatbeaver wrote:
> hi guys, i just started learning php, and am qurious what the arrow
> sign operator mean..
> for ex:
>
> $this->dbConnect();
>
>
> can someone explain it to me?

Ignore it. Learn PHP first, then worry about that one.

It's a whole different way of programming, but unless you know the
language very well in the first place, it will just make things more
confusing.

However, to satisfy the question the -> is referring to a method or
member of a class.

Basically; You can code in objects, which is in very simple terms,
where everything is like a real life object.

e.g. imagine a person object. A person has a name, age, hair colour
etc, so if you had written a person "class" you would use it in you
code with the -> operator. Like...

$someChap = new person(); // set the variable $someChap to be a person
object.

$someChap->name = "Bob";

Anyway, as I said, learn PHP properly first, then worry about all this
stuff. It will make you a better programmer, in my opinion.

Good luck and enjoy it.

Nathan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация