zahlen[$this->nr]; } function next() { $this->nr = $this->nr + 2; } function key() { return $this->nr; } function valid() { return isset($this->zahlen[$this->nr]);} function rewind() { $this->nr = 0; } } $feldObj = new Feld(); foreach($feldObj as $schluessel => $wert) echo "$schluessel/$wert "; echo "
"; for ($feldObj->rewind(); $feldObj->valid(); $feldObj->next()) { $schluessel = $feldObj->key(); $wert = $feldObj->current(); echo "$schluessel/$wert "; } ?>