RE: [PHP] str_pad

From: Date: Fri, 26 Sep 2003 15:18:07 +0000
Subject: RE: [PHP] str_pad
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164045@lists.php.net to get a copy of this message
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 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. | `------------------------------------------------------------'

« previous php.general (#164045) next »