Re: [PHP] get_object_vars()

2002-06-14 Thread Analysis & Solutions
Hi Nick: On Fri, Jun 14, 2002 at 12:02:45PM +0200, Nick Wilson wrote: > > function destroy_properties($obj) { > if($properties=get_object_vars($obj)) { > foreach($properties as $key => $val) { > unset($key); Try this: unset($obj->$key); > pro

[PHP] get_object_vars()

2002-06-14 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I'm using get_object_vars() to unset all of the object vars in a function like this: function destroy_properties($obj) { if($properties=get_object_vars($obj)) { foreach($properties as $key => $val) {