我可以用PHP或其他任何方式执行此操作吗?我想引用数组中的另一个元素。
$config = array(
'factory-code' => array(
'01', '02'
),
'commodity-filter' => array(
'factory' => array(
'steel' => array( $this->factory-code ),
),
'branch' => array(
'steel' => array( $this->factory-code, '09' ),
)
)
);
答案 0 :(得分:0)
您必须在单独的数组中创建工厂代码
$factory_code => array('01', '02');
$config = array(
'factory-code' => $factory_code,
'commodity-filter' => array(
'factory' => array(
'steel' => array( $factory_code ),
),
'branch' => array(
'steel' => array( $factory_code, '09' ),
)
)
);