1

Sorry, I'm a n00b to web languages. I'm trying to upload a CSV file, parse the second and seventh columns, and output it to the Google Graphs API. This is my first ever time trying to do anything with PHP, so, a example would be nice for me to analyze, but, I can try to figure out everything with documentation as well.

Thank you so much for help in any way.

3 Answers 3

1

here's how you can upload a file with PHP: http://de3.php.net/move_uploaded_file Parsing a CSV file is easy:

$csv = file('path/to/file.csv');
foreach ($csv as &$current) {
  $current = explode(';', $current);
}

If you then loop through $csv you have the second and seventh column in $csv[$iterator][1] and $csv[$iterator][6].

I haven't used Googles Graph API, so I can't help you with that.

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

Comments

0

If you're not married to google graphs, try highcharts. I've used it on several occasions and really like it. They have some tutorials and good sample code to look at, too.

Check the other response for parsing a CSV file; it's spot on.

Comments

0

There is a component designed to easily implement the graph by uploading the CSV file: Graph from CSV file

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.