finally! I actually given up on this thread because I thought no one would come inside a thread so many replies.
thanks for the insight ShawnCPlus. Unfortunately, that function doesn't do what I want. because it does not accept an object. maybe I phrased my question wrongly.
$object = new MyClass();
// after some funny operations
// that dynamically creates more member variables
$var = get_class_variables($object); //error.
I'll look up "Reflection" on PHP first. thanks!!
it's actually get_class_vars, not get_class_variables.
If that still doesn't work try
$var = get_class_vars(get_class($object));
Reputation Points: 520
Solved Threads: 268
Code Monkey
Offline 1,564 posts
since Apr 2005