string(3) "1:6" [2]=> string(3) "2:9" [3]=> string(3) "3:2" [4">
时间:2021-07-01 10:21:17 帮助过:2人阅读
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);