我有这样一个数组:
Array (
[0] => Array (
[tsk_hours_spent] => 23425.00
)
[1] => Array (
[tsk_hours_spent] => 2.00
)
[2] => Array (
[tsk_hours_spent] => 0.00
)
[3] => Array (
[tsk_hours_spent] => 0.00
)
[4] => Array (
[tsk_hours_spent] => 0.20
)
)
Run Code Online (Sandbox Code Playgroud)
我想根据'.'分离结果.分成两个数组
即,
在dot one数组之前和在dot one数组之后,例如:
第一个数组将是:23425,2,0,0,0
第二个数组将是:00,00,00,00,20
我有这样的数组
Array
(
[0] => 123_dr_for_ma_on_2352015_2nd Shift_(08-29-2015_11-31).pdf
[1] => 123_dr_for_ma_on_2352015_2nd Shift_(08-29-2015_11-30).pdf
[2] => 123_bms_for__on__(10-06-2015_18-36).pdf
)
Run Code Online (Sandbox Code Playgroud)
我想根据它的值将其转换为多维数组
Array
(
[dr] => Array
(
[0] => 123_dr_for_ma_on_2352015_2nd Shift_(08-29-2015_11-31).pdf
[1] => 123_dr_for_ma_on_2352015_2nd Shift_(08-29-2015_11-30).pdf
)
[bms] => Array
(
[0] => 123_bms_for__on__(10-06-2015_18-36).pdf
)
)
Run Code Online (Sandbox Code Playgroud)
基于名字后的第一个下划线(bms,dr)就像.......请帮我实现这个目的