Posted by 021 on 11/29/05 17:14
Hi,
need some help with this one
i made a page which is reading the last line from a log file. the log is
formatted like this:
text1 > MAIN TEXT *text2
i need to get only the MAIN TEXT part, i don't need the text1 > and *text2
i'm using this code
<?php
$lines = file('sometext.txt');
for ($i = 0, $j = count($lines); $i <=1; $i++) {
print $lines[$j - $i];
}
?>
thanx
[Back to original message]
|