日期:2014-05-17 浏览次数:20525 次
array(5) {
[0]=>
string(3) "0:3"
[1]=>
string(3) "1:6"
[2]=>
string(3) "2:9"
[3]=>
string(3) "3:2"
[4]=>
string(3) "4:4"
}
array(5) {
0=>3,
1=>6,
2=>9,
3=>2,
4=>4
}
$ar = array('0:3', '1:6', '2:9', '3:2', '4:4');Array
foreach($ar as $v) {
$t = explode(':', $v);
$res[$t[0]] = $t[1];
}
print_r($res);