Re: casting arrays as objects

From: Date: Fri, 13 Apr 2001 23:33:02 +0000
Subject: Re: casting arrays as objects
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-48495@lists.php.net to get a copy of this message
"Morgan Curley" <mcurley@e4media.com> wrote: > why mot [sic] just > <?php > $foo = new Foo( $db->fetchRow(DB_FETCHMODE_ASSOC) ); > ?> > > If you have to leave this part of the project for any length of time, > coming back to the above would be much less confusing. ( i think so anyway :) Good idea. That's what I'm using right now, and it works fine -- besides having to manually assign variables -- probably good in the long-run for security and other concerns. All the same, I'm still interested in whether the original problem (casting an array as an object and the object of the assignment keeping its object membership) can work. Dean.

« previous php.general (#48495) next »