I have an array that looks like this:
Array
(
[basisprijs] => 17,00
[basisstaffel] =>
3-10:17;
10-20:14;
20-30:12;
30-40:10;
40-50:7,50;
50-60:6,50;
60-110:6;
[minimaalformaat] => 10x3
[maximaalformaat] => 120x5000
[breedte] => 12
[hoogte] => 4
[aantal] => 1
[Lijmlaag] => Wit(prijsberekening)+($m2*4);
)
I want to create a new array from [basisstaffel]
with after each ;
a new line starting, so the desired end result would be:
Array
(
[0] = > 3-10:17;
[1] = > 10-20:14;
[2] = > 20-30:12;
[3] = > 30-40:10;
[4] = > 40-50:7,50;
[5] = > 50-60:6,50;
[6] = > 60-110:6;
)
How can I do that? Using explode
on the ;
makes me lose that part of the value. So is there another way?
The first array is called $productarray