You are here: Re: PHP « All PHP « IT news, forums, messages
Re: PHP

Posted by sTony on 11/11/06 07:49

That looks like an object, I think. I'm a newbie so I won't say for
certain, but thats what it looks like to me. The function itself looks like
a class constructor, if I've got the terminonogy right. It would be used
like...

$MyObj=addGuestBookEntry();

Then, because of the code in the function, $MyObj would have the properties
of $entry and $data, which are concatenated before finally being written to
a file. Guessing, but I expect the function would work the same, if the
author had used $this[_createEntryHTML()]; instead. I hope that helps, and
I hope I'm right. If not, I'm sure someone will say so.

Happy Coding,

sTony

<Blackhawk@idonthaveone.com> wrote in message
news:n12al2t0g2p7qanmqh9bbgo1dggsgap85m@4ax.com...
> Can someone help me please
>
> I have been playing with PHP for some time but I never ran across code
> like this.
>
> function addGuestBookEntry() {
> $entry = $this->_createEntryHTML();
> if (!$entry) return false;
> $this->data = $entry.$this->data;
> return $this->_writeDataFile();
>
> what is the " ->" doing in the sample above?
> Is that a form of piping the data?

 

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

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