有没有简单快捷的方法来转换 php 数组
$actions = Array ( [visits-visit] => Array (
[0] => index
[1] => edit
[2] => add
[3] => delete
[4] => search
)
)
至
Array ( [visits-visit] => Array ( index ,edit ,add ,delete, search ) )
我有一个第一种格式的数组,需要这样添加
$this->allow($_userRole, 'module-contr', array( index ,edit ,add ,delete, search));
当我这样
$this->allow($_userRole, 'module-contr', array( $actions ));
它没有按我的意愿接受。