从样式数组:
Array
(
[0] => style1|000000
[1] => style2|ff6600
)
我做了这个循环
foreach($styles as $key=>$value){
$sort_values[] = explode('|',$value);
}
** 和 print_r($sort_values) 我得到:**
Array
(
[0] => Array
(
[0] => style1
[1] => 000000
)
[1] => Array
(
[0] => style2
[1] => ff6600
)
)
但我需要它是:
Array
(
[styles] => Array
(
[0] => style1
[1] => style2
)
[links] => Array
(
[0] => 000000
[1] => ff6600
)
)
任何帮助表示感谢,谢谢!