okay sorry i didnt clarify what i meant by empty.  meant when i do a
var_dump() on it i get an empty array.   i have searched most of the day but
in actuality it is rather straight forward.  $newpets() from user input.
and when i print it it is just fine but immediately after i call this
fuction

pets->dog->weekcount($newpets);

so i guess if the array prints find just before the function yet it still
shows an empty array i am baffle where else the problem could be the rest of
the code doesnt really even come near these values or function








Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code

101 little bugs in the code . . .'

And it continued until they reached 0


----- Original Message -----
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: "Jon Yaggie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 6:31 PM
Subject: RE: [PHP] oop thingie


> Not sure about your code, but what you describe is perfectly faesible in
> PHP.
> If you are setting values in one part of your code and cannot see these
> values in another part of your code then I would suggest that you have
> reference problem somewhere. The code you provided looks fine, maybe the
> problem is elsewhere.
>
> Alternatively you are looking in th ewrong place. You say that
> pets->dog->lostpets is always empty, yet your code seems to suggest that
> pets->dog is an array of objects, in which case you should be looking at
> pets->dog[n]->lostpets rather than pets->dog->lostpets.
>
>
> -----Original Message-----
> From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
> Sent: 20 July 2001 12:15
> To: [EMAIL PROTECTED]
> Subject: [PHP] oop thingie
>
>
> ok first of all i admit i am complete new to OOP.  Secondly didnt write
this
> script.  but there is my problem
>
> i declare a class say dog.  dog uses a constructor that has a few extra
> unassigned arrays.
>
> laster i declare a new instance of dog in another class (pets)  i invoke
the
> constructor and all is well with a few empty arrays as part of my object.
> but how can i put information in these arrays?  can i do it through pet?
> for example can i make a member function in pet that goes soemthing like
> this -
>
>   function wekkcount($id, $newpets) {
>   $i=0;
> while($newpets[$i])
>  {
>     $this->dog[$id]->lostpets[$i] = $newpets[$i];
>     $i++;
>  }
>
>
> where this refers to class pets and dog is an instance of dog?
>
> i have been trying to all day and even though i know for sure $newpets has
> information in it.  i always have an empty array in pets->dog->lostpets.
i
> am starting to believe maybe i just cant do it.  or maybe there is
soemthing
> stupid i am missing?
>
>
>
>
>
>
>
>
> Thank You,
>
> Jon Yaggie
> www.design-monster.com
>
> And they were singing . . .
>
> '100 little bugs in the code
> 100 bugs in the code
> fix one bug, compile it again
> 101 little bugs in the code
>
> 101 little bugs in the code . . .'
>
> And it continued until they reached 0
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to