I'm basically just trying to get from this:
$value="20, 40, 40"
$color="blue, green, orange"
To this:
var data = [ { value: 20, color:"blue" }, { value : 40, color : "green" }, { value : 40, color : "orange" }]
So I need to extract the value and color add put them item this array of objects. I know how this could be done if only value needed to be set, not color as well using explode and foreach, but I have not idea how to do this needing both values.
Any ideas are much appreciated.
Thanks,
David