$line) { if($appendix) { //echo $line; die(); if(preg_match("/^([^<]*)<\/B>$/",$line)) { if($lines[$i+1] === "") $functions[] = preg_replace("/^([^<]*)<\/B>$/","$1",$line); } } else { if(preg_match('/^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); } ?>