> anyone that can find the problem..?
> description below.
>
> <html>
> <head>
> <title>debug</title>
> </head>
> <body>
> '***************************************' OUTPUT
> '**************************************'<br><br>
> <?php
>
> class Relic {
>
> var $RelicName = Array();
> var $RelicType = Array();
> var $RelicRealm = Array();
> var $RelicOwner = Array();
> var $i;
>
> function PrintInfo() {
> for ($this->i = 0; $this->i < count($this->RelicName);
genereal question:
would be
for($i = 0; $ii < count($this->RelicName)
faster ?
> $this->i++) {
> print "$this->RelicName[$this->i] :
> $this->RelicType[$this->i] : $this->RelicRealm[$this->i] :
> $this->RelicOwner[$this->i]<br>";
> }
> }
echo $this->RelicName[$this->i]." : ".$this->RelicType[$this->i]." :
".$this->RelicRealm[$this- i].":"$this-RelicOwner[$this->i]."<br>";
echo and print functions obviously
don't get along with class variable
in quotes.
greetings
robert
>
> function SetName($name) {
> $this->RelicName[] = $name;
> }
>
> function SetType($type) {
> $this->RelicType[] = $type;
> }
>
> function SetRealm($realm) {
> $this->RelicRealm[] = $realm;
> }
>
> function SetRelicOwner($owner) {
> $this->RelicOwner[] = $owner;
> }
>
> }
>
> $temp = new Relic();
> $temp->SetName("olle");
> $temp->SetType("melee");
> $temp->SetRealm("Hibernia");
> $temp->SetRelicOwner("Albion");
> $temp->SetName("bertil");
> $temp->SetType("melee");
> $temp->SetRealm("Albion");
> $temp->SetRelicOwner("Hibernia");
> $temp->SetName("sture");
> $temp->SetType("magic");
> $temp->SetRealm("Midgard");
> $temp->SetRelicOwner("Midgard");
> $temp->PrintInfo();
> ?>
>
> </body>
> </html>
>
> the function PrintInfo prints out this:
> '***************************************' OUTPUT
> '**************************************'
>
> Array[0] : Array[0] : Array[0] : Array[0]
> Array[1] : Array[1] : Array[1] : Array[1]
> Array[2] : Array[2] : Array[2] : Array[2]
>
> heh,, not exacly what i wanted :/
>
> regards
> patrick
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php