php5 iterate an object
| From: | Henrik Gemal | Date: | Sun, 22 Jan 2006 16:53:51 +0000 |
| Subject: | php5 iterate an object | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229033@lists.php.net to get a copy of this message | ||
I have an object that looks like this:
Test Object
(
[config] => TestConfig Object
(
[file:protected] => test.conf
[kill:protected] => 1
)
[location:private] => "test"} I'm trying to write an PHP5 iterator that can iterate over an object but I'm not sure how. The manual for PHP5 iterators seems to only work with arrays. How do I iterate over an object and only get the name of the attribute ("config") and not the entire name ("Test::config")