php class and arrays madness at least for me
===

So there are two things that I am stuck on now. First

    class DisplayTaxonomy {
    public $MyArray[]= new DisplayTaxonomy();  //the compiler says syntax error
    //things I have tried 
    //public $ss[]= new Object();  
    
    
    }

Second! in a function like this: 

    public function whatever()
    {
         $Temp = new DisplayTaxonomy();
         $Temp->setADTitle("1");
         $MyArray[]= $Temp;//works just fine.
         //then i tried to return the array 
          return $MyArray[];
    
    
    }

I get the following
//Cannot use [] for reading in C:\xampp\htdocs\wordpress\wp-//content\themes\twentyeleven\page.php on line 52
then in the client side

    $y=new DisplayTaxonomy();
    $myArray[]=new DisplayTaxonomy();
    $myArray[]=$y->createTaxonomyClassArray(1);
    echo $myArray[0]->getADTitle();
