Page 1 of 1

How to combine multiple arrays to csv file

Posted: Thu Jan 11, 2018 6:32 am
by nashman
>$a = 1,2,3
>$b = 'x','y','z'
>$c= $a + $b
>$c
1
2
3
x
y
z

What I want is:
1x
2y
3z

Furthermore, I want to export this into csv file with two colums (1,2,3) and (x,y,z).

Thanks!

Re: How to combine multiple arrays to csv file

Posted: Thu Jan 11, 2018 6:39 am
by jvierra
You would have to enumerate the two arrays and generate custom objects. The resulting collection can then be exported to a CSV.