I don't know if a array is really a object on php ... but, what I want is to change the array behavior on a foreach loop.
Something similar to this on java:
for( String it : myArr = new Array_Iterator( array) implements Iterator{
public Array_Iterator( String[] arr){ this.arr = arr}
/* interface implementation */
}){
/* loop */
}
What I really want to accomplish is a kind of filter, so that I don't get entries from the array that I don't want