PHPExcel ' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Examples'; $exampleList = glob('./'.$exampleType.'/*.php'); foreach($exampleList as $exampleFile) { $fileData = file_get_contents($exampleFile); $h1Pattern = '#

(.*?)

#'; $h2Pattern = '#

(.*?)

#'; if (preg_match($h1Pattern, $fileData, $out)) { $h1Text = $out[1]; $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : ''; echo '',$h1Text,'
'; if (($h2Text > '') && (pathinfo($exampleType,PATHINFO_BASENAME) != 'Calculations')) { echo $h2Text,'
'; } } } } ?>