$line = $fcontents[i];

should read 

$line = $fcontents[$i];

-----Original Message-----
From: Josh Edwards [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 1:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Where's the error?


Thanks heaps for your help I really appreciate it.  I have made the changes
you suggested but now I only get a blank screen.

function getmydate($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 (!empty($line))
{
$currentdate = getmydate($line);
echo $currentdate;
}
}





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

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

Reply via email to