2
['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Papua New Guinea', 'Rwanda', 'Average']

that's first table required to build google chart Combo Chart

im looking for any way to easy create it in my template i can use implode() but dont want to. When i pass array directly it look like this :

[Jack][Daniel][Poul]

is there a easy way to achive what google require ??

2
  • 2
    Use json_encode($array);. Commented Dec 19, 2012 at 12:18
  • Just split the string to get a javascript array ? Commented Dec 19, 2012 at 12:19

1 Answer 1

3

Looks like you need to send JSON. As long as you have a current version of PHP (I believe 5.2+), you can use

json_encode($yourArray);
Sign up to request clarification or add additional context in comments.

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.