rendered paste body<?php $file = file_get_contents('php_manual_patched.html'); $lines = preg_split("/[\r\n]+/", $file); //explode file by lines $functions = array(); $appendix = false; foreach($lines as $i => $line) { if($appendix) { //echo $line; die(); if(preg_match("/^<B\sCLASS=\"function\">([^<]*)<\/B>$/",$line)) { if($lines[$i+1] === "</A>") $functions[] = preg_replace("/^<B\sCLASS=\"function\">([^<]*)<\/B>$/","$1",$line); } } else { if(preg_match('/^<A\sNAME="indexes">Appendix\sU\.\sFunction\sIndex<\/A>$/',$line)) $appendix = true; } } print_r($functions); // fucking php4: (don't need this yet, though) function file_put_contents($name,$string) { $file = fopen($name,'w'); fwrite($file,$string); fclose($file); }?>