This is meant  to grab a date out of a log file from the first line of the
array but I'm getting a parse error on line 13. Any  ideas?

function getdate($hit)
 {
$single = explode (" ",$hit);
return $single[3].$single[4];
}

$filename = ("combined_log");

fopen ($filename, "r");

$fcontents = file($filename);
 $limit = 1;
for ($i = 0; $i <= $limit; $i++)
{
$line = $fcontents[i];
if ($line! = " ")
{
$currentdate = getdate($line);
echo $currentdate;
}
}




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

Reply via email to