Re: [PHP] simple OO question

2001-03-04 Thread Andrew Halliday
Ahh damn - minor omission - add a '( )' after myclass constructor name :-) AndrewH - Original Message - From: "Andrew Halliday" <[EMAIL PROTECTED]> To: "John LYC" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 05, 20

Re: [PHP] simple OO question

2001-03-04 Thread Andrew Halliday
this: > > > > $myclassObj = new myclass(); > > $myclassObj->setmyvar(10); > > echo $myclassObj->myvar; > > > > This would print '10'... > > > > Cut and paste that exact program in and it should be a working demonstration > > ... > >

Re: [PHP] simple OO question

2001-03-04 Thread John LYC
and it should be a working demonstration > ... > > You should read the php manual more ... > see > www.php.net > > AndrewH > - Original Message ----- > From: "John LYC" <[EMAIL PROTECTED]> > To: "PHP List" <[EMAIL PROTECTED]> >

Re: [PHP] simple OO question

2001-03-04 Thread Andrew Halliday
" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Monday, March 05, 2001 1:36 PM Subject: [PHP] simple OO question > can i do this..? > > //declaring class > > class myclass{ > > //declaring properties > ... > > > //decla

[PHP] simple OO question

2001-03-04 Thread John LYC
can i do this..? //declaring class class myclass{ //declaring properties ... //declaring methods.. function mymethod(){ //can i declared variable in method? var $myvar; ... //do something }//end of mymethod /// if yes, do i access myvar like this. $item = new myclass;