[PHP] generically accessing member variables problem

2002-11-05 Thread John Kenyon
I'm trying to write a function I can plop in a bunch of different classes without having to modify it. Basically I have classes like: class Example { var $array1; var $array2; var $array3; etc. } and I want to have a function in that class that looks something like this: function

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
as if I had written the call explicitely to $this-memberarray. Does this make any more sense? jck Marek Kilimajer wrote: If I understand you, you need to have a basic class with the one function and subclass it. Then you can reference the array as $this-$passed_in_array_name John Kenyon wrote: I'm

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
Thanks, that may be what I was looking for. jck Maxim Maletsky wrote: You can do: ${this-$passed_in_array_name} not sure right now of the correct syntaxing, I never do that - normally I'd pass the element key. -- Maxim Maletsky [EMAIL PROTECTED] John Kenyon [EMAIL PROTECTED] wrote

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
See below: MM class Example { MM var $array = array(); MM function add2array($element_name, $val){ MM $this-$array[$element_name] = $val; MM } MM } MM $t = new Example(); $t-add2array('array1',25); $t-add2array('array2',26); $t-add2array('array3',Hello); MM echo 'pre';

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
. -- Maxim Maletsky [EMAIL PROTECTED] John Kenyon [EMAIL PROTECTED] wrote... : See below: MM class Example { MM var $array = array(); MM function add2array($element_name, $val){ MM $this-$array[$element_name] = $val; MM } MM } MM $t = new Example(); $t-add2array('array1',25); $t-add2array

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
. -- Maxim Maletsky [EMAIL PROTECTED] John Kenyon [EMAIL PROTECTED] wrote... : I am not really sure I understand what you are saying here, and I would like to. Let me first say that I think the syntax you came up with earlier will solve my immediate problem, but if I could design

Re: [PHP] I'm in need of a PHP web host recommendation

2002-11-16 Thread John Kenyon
Jason Reid wrote: I suggest paying a visit to www.webhostingtalk.com and search the forums... theres tons of information on the large, and small hosts that might help. I use www.phpwebhosting.com and have been happy with them so far. $10 a month, but they are generous (and flexible, at