RE: [PHP]any way to iterate the fields in a class

2010-11-29 Thread Daevid Vincent
> -Original Message- > From: ?? [mailto:xiaohan2...@gmail.com] > Sent: Thursday, November 25, 2010 12:21 AM > To: php-general@lists.php.net > Subject: [PHP]any way to iterate the fields in a class > > Actually, what I am seeking is how to assign values to the

RE: [PHP]any way to iterate the fields in a class

2010-11-25 Thread Tommy Pham
> -Original Message- > From: č‚–įž— [mailto:xiaohan2...@gmail.com] > Sent: Thursday, November 25, 2010 12:21 AM > To: php-general@lists.php.net > Subject: [PHP]any way to iterate the fields in a class > > Actually, what I am seeking is how to assign values to the field

[PHP]any way to iterate the fields in a class

2010-11-25 Thread č‚–æ™—
Actually, what I am seeking is how to assign values to the fields in a class via an array. I have tried like this. However failed. I have a class. *class book{ var name;* *var price;* *}* * * And I have got an array. *$array=array('name'=>'harry potter','price'=>'$122');* By using function *extra