I've written a class called Datensatz, i put this object into an array and want to use it in another php file - in the array is an object i included the class other this php file,but if try to do this:
foreach($datensatzarray as $key=>$val) {
echo $val->text;
echo $val->user;
echo $val->date;
}
this returns a fatal error, it says:
Cannot redeclare class Datensatz in ....
the class Datensatz looks like this:
class Datensatz {
var $text;
var $user;
var $date;
function Datensatz($t,$u,$d){
$this->text=$t;
$this->user=$u;
$this->date=$d;
}
}
please help
Gianni