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>";
  while(!feof($fp)) {
    $temp = fgetcsv($fp, 1024, ":");
    $event_list[$i] = 
  return $event_list;

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

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

Reply via email to