0

Can I use Zend_Translate to convert a data array into a csv file?

Robbo_UK
  • 11,351
  • 25
  • 81
  • 117

2 Answers2

1

You can do that with plain php.

Implode the array and echo it out in csv format.

Naftali
  • 144,921
  • 39
  • 244
  • 303
  • yeah but you need to escape comma's and quotes etc. I thought there would be a package on the framework that would help with this – Robbo_UK Nov 05 '11 at 17:20
  • @user1030168 nothing to escape, just use explode and implode. – Naftali Nov 07 '11 at 15:15
  • what if you have the following $data = array(); $data[] = 'this text'; $data[] = text , more $data[] = text , mo more,and more you would need When you implode this array you would need to escape the comma's inside each data item – Robbo_UK Nov 07 '11 at 17:27
0

found this... how to import CSV using zend

looks like zend translate is not the best option for what I was trying to do

Community
  • 1
  • 1
Robbo_UK
  • 11,351
  • 25
  • 81
  • 117