PHP Use Declared array Variable inside already Declared Array
This is more a generic PHP question than anything to do with WordPress, but I’d suggest setting the value in the constructor: class test { public $basicCols; public $optList = array( ‘one’ => ‘One’, ‘two’ => ‘Two’ ); function __construct() { $this->basicCols = array( array( ‘title’ => ‘KEY’, ‘field’ => ‘slug’, ‘options’ => $this->optList ), … Read more