Re: [PHP] Arrays within classes

2002-04-11 Thread Erik Price
On Friday, April 5, 2002, at 03:00 PM, Brian McLaughlin wrote: > My problem is that when I assign an empty array to a variable, I get > different results depending on whether that variable is in an object or > not. > In the case of assigning $a=array(); outside of an object, each element > of

Re: [PHP] Arrays within classes

2002-04-05 Thread Brian McLaughlin
Thank you!! Now I need to figure out how to put all this hair back in my head. Brian "Rick Emery" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I corrected the syntax errors Erik found and added var_dump() after each $t > equation/assignment > > The proble

Re: [PHP] Arrays within classes

2002-04-05 Thread Brian McLaughlin
Hi Erik Thanks for the reply. I'm not sure how I missed the opening { in my message -- I copy/pasted the code. But the opening { is definitely there in the code -- I'd get a nice error message if it weren't. I believe it's OK to have a ; after the class def end-brace, but I removed it and I go

RE: [PHP] Arrays within classes

2002-04-05 Thread Rick Emery
riginal Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:28 PM To: 'Brian McLaughlin'; [EMAIL PROTECTED] Subject: RE: [PHP] Arrays within classes I corrected the syntax errors Erik found and added var_dump() after each $t equation/assignment The proble

RE: [PHP] Arrays within classes

2002-04-05 Thread Rick Emery
I corrected the syntax errors Erik found and added var_dump() after each $t equation/assignment The problem is that you refer to $test->words. You should refer to $test->words BIG DIFFERENCE $test->words means find the value of $words and look for that variable in $test. That is, if $words ="a

Re: [PHP] Arrays within classes

2002-04-05 Thread Erik Price
I might be completely mistaken here, but it looks like there are a few errors in your code: - No starting brace for the test() method - semi-colon used after class def end-brace - no parentheses after "new test" instance assignment Don't you want to keep your class as general as possible, and p