Filter XML by elements [duplicate]
This question already has an answer here: Split foreach to pages 2 answers <?php $files = glob( 'docs/*.xml' ); if ( isset( $_GET['doctype'] ) == "all" ) { foreach ( $files as $file ) { $xml = new SimpleXMLElement( $file, 0, true ); echo' <tr> <td id="'. $xml->doctype .'" name="'. $xml->doctype .'" class="mainTable">' . $xml->doctype . '</td> <td><a href="viewdoc.php?docname=' . basename( $file, '.xml' ) . '&username='. $xml->startedby .'&myname='. $_SESSION['username'] .'">' . basename( $file, '.xml' ) . '</a></td> <td><a href="viewprofile.php?name='. $xml->startedby .'">'. $xml->startedby .'