0) $return = array($occurences, implode('', $file_array)); else $return = FALSE; return $return; } /*************************************** ** Function for writing out a new file. ***************************************/ function writeout($filename, $contents){ if($fp = fopen($filename, 'w')){ fwrite($fp, $contents); fclose($fp); }else{ die('Could not open file: '.$filename); } } /*************************************** ** First do whatever files are specified, ** and/or if directories are specified, ** do those too. ***************************************/ $occurences = 0; $ignore = explode(',', $ignore_lines); if($find != ''){ if(!empty($files)){ if(ereg(',', $files)) $files = explode(',', $files); else $files = array($files); for($i=0;$i