0

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

3
  • Why would you use Zend_Translate? A little more backstory would go a long way to more specific answers... Commented Nov 4, 2011 at 17:45
  • maybe zend translate is not the best tool? on my searches it looks like it can handle CSV's Commented Nov 7, 2011 at 17:33
  • Ahhh gotcha. Post some code snippets and we can better help you. Commented Nov 7, 2011 at 17:52

2 Answers 2

1

You can do that with plain php.

Implode the array and echo it out in csv format.

Sign up to request clarification or add additional context in comments.

3 Comments

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
@user1030168 nothing to escape, just use explode and implode.
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
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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.