RE: [PHP] str_pad
| From: | Robert Cummings | Date: | Fri, 26 Sep 2003 15:20:11 +0000 |
| Subject: | RE: [PHP] str_pad | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164047@lists.php.net to get a copy of this message | ||
On Fri, 2003-09-26 at 11:18, Robert Cummings wrote:
> On Fri, 2003-09-26 at 11:00, Jeff McKeon wrote:
> > Just learning PHP and figuring out all the syntax and stuff. Anyway I
> > had a question about the code example in this post...
> >
> > What does the "->" do in:
> >
> > $dbranch = str_pad($line->dbranch_no, 6, '', STR_PAD_LEFT);
> >
> > Is dbranch_no a "class" I don't know about?
>
> $line is an instance of some class (not shown in the above). dbranch is
Should say dbranch_no 8)
> a member variable of the class, and subsequently an instance variable of
> the object $line. The -> is how you access methods and variables in
> objects.
>
> HTH,
> Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'