i got my nice looking class like this:
<?php
class Relic {
var $RelicName;
var $RelicType;
var $RelicRealm;
var $RelicOwner;
function PrintInfo() {
print "$this->RelicName : $this->RelicType : $this->RelicRealm :
$this->RelicOwner<br>";
}
function CheckForPrint() {
if ($this->RelicName == "" || $this->RelicType == "" || $this->RelicRealm
== "" || $this->RelicOwner == "") {
return false;
} else {
return true;
}
}
function Clean() {
$this->RelicName = "";
$this->RelicType = "";
$this->RelicRealm = "";
$this->RelicOwner = "";
}
function SetName($name) {
$this->RelicName = $name;
}
function SetType($type) {
$this->RelicType = $type;
}
function SetRealm($realm) {
$this->RelicRealm = $realm;
}
function SetOwner($owner) {
$this->RelicOwner = $owner;
}
function DebugPrint() {
print $this->RelicName;
}
}
$temp = new Relic();
$temp->SetName("test");
$temp->DebugPrint();
?>
but the thing is i want an array that is based on my class, so i want to use
$relicarray[1]->DebugPrint();
how does it work,, anyone that can give me a working example, cause i cant
find any :/
regards
patrick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php