I am relatively new to PHP but have had some background in OOP.  I am having some 
trouble with a method that for a certain class.  The problem is that I can seem to 
read my objects from an array that I am storing them to.  I keep getting the error 
"Call to a member function on a non-object".  I have attached the code that contains 
the error, I would appreciate any help that can be provided.

function getEvents($filename) {
//string $filename
  $event_list = array();
  $event_object = new event();
  $i = 0;
  
  @ $fp = fopen($filename, "r");
  if(!$fp) {
    echo "<p><strong>Cannot open ".$filename." for reading mode...</strong></p>";
    exit;
  }
  while(!feof($fp)) {
    $temp = fgetcsv($fp, 1024, ":");
    $event_list[$i] = 
$event_object->init($temp[0],$temp[1],$temp[2],$temp[3],$temp[4],$temp[5],$temp[6],$temp[7],$temp[8]);
    $i++;
  }
  fclose($fp);
  
  return $event_list;
}



P.S. Please CC it directly to me, as I will receive the reply faster that way.
 
Joshua E Minnie
CIO
[EMAIL PROTECTED]

"Don't work for recognition, but always do work worthy of recognition."

Reply via email to