parse($_SESSION['lampath'] . 'config/pdf/' . $scope . '/' . $definition); $border = array(); $structure = array(); $pdf_entries = $xml[1]['PDF']; $border[$current] = array(); while(($index = current($pdf_entries)) != null) { if($xml[0][$index]['attributes']['TYPE'] == $scope) { $border['start'] = $index; next($pdf_entries); $border['end'] = current($pdf_entries); } next($pdf_entries); } $structure = array_slice($xml[0],$border['start'] + 1,$border['end'] - ($border['start'] + 1)); return $structure; } ?>