如何将带有管道的逗号分隔字符串转换为两个不同的数组?
$combo_string = 'blue|car, red|truck, green|boat, yellow|bike';
我需要的地方:
$colors_array =
Array (
[0] => blue
[1] => red
[2] => green
[3] => yellow
)
和
$vehicles_array =
Array (
[0] => car
[1] => truck
[2] => boat
[3] => bike
)
提前致谢。