Re: [PHP] Object References Problem

2003-10-31 Thread Gareth Williams
Boyan, Michael and Mike, Thanks for the help, I now understand what is going on, and you guys have saved me from pulling my hair out in frustration. I'm more used to doing OOP in Delphi and Perl, and the peculiarities of PHP are somewhat confusing. Once again, thanks for the help. On Friday,

[PHP] Object References Problem

2003-10-30 Thread Gareth Williams
Hi there, I'm having trouble with passing objects as references. What I want to do is something like this: class object_1 { var $my_chld; var $my_array; function object_1() { $this-my_array = array('id' = 0, 'name'=''); $this-my_child =

Re: [PHP] Object References Problem

2003-10-30 Thread Boyan Nedkov
Since i see from your code, you are trying to create an object which maintains a list (collection) of instances of another object. Is that correct? Or you are trying to inherit a class from a parent class? Then it's a little bit different story. If this is the case, just tell me and I'll

Re: [PHP] Object References Problem

2003-10-30 Thread Michael Sims
On Thu, 30 Oct 2003 22:54:49 +0100, you wrote: Hi there, I'm having trouble with passing objects as references. What I want to do is something like this: [snip code] The above code give the output: instance: parent: test where I want it to give: instance: test parent: test I don't pretend

Re: [PHP] Object References Problem

2003-10-30 Thread Mike Migurski
I don't pretend to fully understand PHP references, or the strange and mysterious ways that they work in regards to PHP objects, but I can tell you how to acheive the results you desire. Someone else will have to explain it. :) snip If someone sees that I'm leading Gareth astray here, feel free