resourceId = $resourceId; $this->pull_Resource_Object(); $this->wrap_Resource_Object(); } } function pull_Resource_Object(){ $query = "SELECT * from lp_resource WHERE resourceId = '$this->resourceId' LIMIT 1"; $result = mysql_query($query); if(!$result){ Lp_internal::internal_error($query, 'Lp_Resource::pull_Resource_Object()'); return false; } $obj = mysql_fetch_object($result); $this->resourceObj = $obj; } function wrap_Resource_Object(){ $this->fileArray = $this->resourceObj->fileArray; $this->create_Obj_File_Array(); return true; } function create_Obj_File_Array(){ if(!$this->fileArray)){ return false; } // No files in Resource $files1 = unserialize($this->fileArray); if(is_array($files1)){ $this->files = $files1; //Verified that unserialized value is an array. } } /* THIS IS WHERE THE PROBLEM IS!!!!!! WHen i iterate through $this->files is where the problem is (called from outside the object) */ function create_File_List(){ $html = '
File List...
'; $html .= '
'; if(is_array($this->files) && count($this->files) > 0){ foreach($this->files as $fileId){ $File = new Lp_Userfile($fileId); $html .= '
'; $html .= '
'. $File->displayName . '
'; $html .= '
'; } $html .= '
'; }else{ $html .= ' No Files... '; $html .= $this->files[0]; // This is where I get the value "A" from "Array" } print $html; } } ?>