我从该代码中得到2个数组:
$default = '2000,1000,750';
$defaultRule = 'min-width:2000,min-width:1000,min-width:750';
$arr_responsive = explode(',' , $default);
$arr_responsiveRule = explode(',' , $defaultRule);
现在我想获得一个唯一的数组,其键为= $ arr_sensitive,值= $ arr_sensitiveRule
获取:
$array(
'2000' => 'min-width:2000',
'1000' => 'min-width:1000',
'750' => 'min-width:750'
)
感谢您的帮助
答案 0 :(得分:1)
$result = array_combine(
$arr_responsive, // these are keys
$arr_responsiveRule // these are values
)