Page 1 of 1

I am not able to iterate through object vars[solved]

Posted: Mon Jun 05, 2006 7:33 am
by raghavan20

Code: Select all

foreach ( $CreditCard as $k => $v ){
				$this->rended_code .= "$k = $v<br>";
			}
I know for sure there is data in CreditCard object, but it displays nothing.
Even if I use get_object_vars() it returns nothing for any object.
I use PHP 5.

Posted: Mon Jun 05, 2006 7:38 am
by feyd
What access level are the properties of $CreditCard? If they aren't public, you won't find them.

Posted: Mon Jun 05, 2006 9:25 am
by raghavan20
yeah...all properties in mine are private and I have now found that I am not able to view those properties because of security....thanks feyd