Static Array declaration within class PHP5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I'm trying to create a public static array within a class.(PHP5). 

First - the following fails: 

class yadayada { 
        public static $tester[0]="something"; 
        public static $tester[1]="something 1"; 

Second - However the following works:

class yadayada { 
        public static $tester = array (0 => "something", 1 >="something 1"); 

My question is this: I have an array that has about some 150 different values and using the second example would get very very messy, is there another method of doing this ? The first example(which fails) is the cleanest, is there anything I can do ? 

Thank you


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux