NYCPHP Meetup

NYPHP.org

[nycphp-talk] Object Methods and Properties

Daniel Convissor danielc at analysisandsolutions.com
Thu Jul 29 13:04:44 EDT 2004


Joe:

On Thu, Jul 29, 2004 at 01:01:55PM -0400, Daniel Convissor wrote:
> 
>     if (isset($this->$part)) {
>     }

I forgot to mention (because I started saying it in a prior reply that 
I ended up quitting to start over)...

Make sure to declare your properties with a value.  Strings:
   private $item = '';

Numbers:
   private $item = 0;

Arrays:
   private $item = array();

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list