exclude part of text
| From: | 021 | Date: | Tue, 29 Nov 2005 15:14:02 +0000 |
| Subject: | exclude part of text | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-226588@lists.php.net to get a copy of this message | ||
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