In my last two posts, I talked about PHP iterators. Here is a quick tip on the same topic. If you have ever used iterators in your code, you have probably implemented the Iterator interface. Objects of a class that implements Iterator can be iterated over with the foreach loop: $foo = new Foo(); foreach ($foo as $key => $value) { // do something with $key and $value } The Iterator interface has fi