All pastes #349533 Raw Edit

Mine

public php v1 · immutable
·published 2007-02-10 21:49 UTC
rendered paste body
private function get_file_output ($file, $error_line) // Gets file and error line. returns output array        {                $content_arr = file ($file);                print "<pre>";                print_r ($content_arr);                                $line_start = $error_line - 5 > 0 ? $error_line - 5 : 0; // Line to start                $line_end = $error_line + 5 <= sizeof ($content_arr) ? $error_line + 5 : sizeof ($content_arr); // Line to end                                $output_arr = array ();                                for (; $line_end > $line_start; $line_start++) // Makes output array                {                        $output_arr [$line_start] = $content_arr [$line_start];                }                                        return $output_arr;        }