> Thanks heaps for your help I really appreciate it. I have > made the changes you suggested but now I only get a blank screen.
These are more general hints on ways to solve the problem yourself. > function getmydate($hit) > { > $single = explode (" ",$hit); > return $single[3].$single[4]; > } What happens if you feed this function a designated string that you explicitly provide. ie. Define $string to be a line of data you'd like get date info on and then call the function. If you get the right thing you know your function is doing what you expected. > $filename = ("combined_log"); > > //fopen ($filename, "r"); > > $fcontents = file($filename); > $limit = 1; > for ($i = 0; $i <= $limit; $i++) > { > $line = $fcontents[i]; Try echo'ing $line to make sure you actually had something happen. > if (!empty($line)) > { > $currentdate = getmydate($line); > echo $currentdate; > } > } Work up to the whole solution if you find things not working like you'd expect. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php