我有这个数组,我尝试过以同样的方式返回它。
例子:
$this->permission_array = array(
'orders' => 1,
'orders_Status' => 0,
'schools' => 0,
'accommodation' => 0,
'users' => 1,
'news' => 0,
'blocks' => 1,
'settings' => 0,
'videos' => 1,
);
将其内爆并插入到数据库后,它变成了这样。
USER_ID USER_NAME USER_PERMISSION
---------------------------------------------------
1302 Othman 1,0,0,0,1,0,1,0,1
现在如果我使用explode,它会作为一个数组返回,但键不一样。我如何将这些值传输到与此数组不同的同一个数组:
[0] => 1
[1] => 0
[2] => 0
[3] => 0
[4] => 1
[5] => 0
[6] => 1
[7] => 0
[8] => 1
无论如何要再次将最后一个数组更改为第一个数组?提前致谢。