Re: exclude part of text
| From: | David Grant | Date: | Tue, 29 Nov 2005 15:40:29 +0000 |
| Subject: | Re: exclude part of text | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-226589@lists.php.net to get a copy of this message | ||
Hi,
021 wrote:
> <?php
> $lines = file('sometext.txt');
> for ($i = 0, $j = count($lines); $i <=1; $i++) {
> print $lines[$j - $i];
> }
> ?>
For a start, try this instead:
$lines = file('sometext.ext');
$last = end($lines);
Secondly, do you have an example of the real log file?
Cheers,
David Grant
--
David Grant
http://www.grant.org.uk/