How can I convert a comma seperated string with pipes to two different arrays?
$combo_string = 'blue|car, red|truck, green|boat, yellow|bike';
where I need:
$colors_array =
Array (
[0] => blue
[1] => red
[2] => green
[3] => yellow
)
and
$vehicles_array =
Array (
[0] => car
[1] => truck
[2] => boat
[3] => bike
)
Thanks in advance.
1 Answer