We help IT Professionals succeed at work.
Get Started

Google Charts line graph from PHP arrays

msibley asked
Last Modified: 2020-01-14
I have a PHP script that processes data from a MySQL database. It basically is a series of amplitude values for a range of frequencies. The output winds up in 2 arrays, one holds the frequency (1, 1.5, 2, 2.5 ... 30) and the other holds the amplitude values (for example 2.5, 1.6, 9.5, etc.). What I'd like to do is output a simple line graph using these arrays, with the x axis being the frequency and the y axis the amplitude. I'm having difficulty figuring out how to input the arrays directly into the Google Charts code.
Watch Question
Scott FellDeveloper
Most Valuable Expert 2013
This problem has been solved!
Unlock 2 Answers and 8 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE