exclude part of text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux