[PHP] Help with using SPL to build a MySQL Iterator

2005-05-18 Thread V Kam
Hello all I was trying to write an SPL Iterator for a MySQL result set but not having any luck. Specifically I'm not sure how to overload the key() and current/next() methods. Does anyone here have a working code sample that does this, or can offer some guidance on how to overload the 5 Iterator

[PHP] Using a recursive ArrayIterator

2005-02-03 Thread V Kam
Hello all I need some assistance converting code to use the RecursiveIterator in PHP 5 SPL. I have the following function which scans through a nested array set and returns the path to all matches. $value) { $path .= "$key/"; // unset the p