fej = GiroDETSTAFej::parse($array[0]); $detsta->lab = GiroDETSTALab::parse($array[count($array) -1]); for ( $i = 1 ; $i < count($array) -1; $i++ ){ $row = $array[$i]; $tetel = GiroDETSTATetel::parse($row); $detsta->tetelek[] = $tetel; } return $detsta; } }