matthewhorsham Posted January 25, 2007 Share Posted January 25, 2007 As the subject says I'm new to php. I wanted to post in the newbie help forum but couldn't find it, I am worried about my ability to code based upon this lapse but onwards:I have a bundle of csv files that look something like this:data 1\t data2\t data3\t data4\t data5\t01/01/00\t 11\t 12\t 13\t 14\t 1a\t 1b\t02/01/00\t 21\t 22\t 23\t 24\t 2a\t 2b\t03/01/00\t 31\t 32\t 33\t 34\t 3a\t 3b\t04/01/00\t 41\t 42\t 43\t 44\t 4a\t 4b\t05/01/00\t 51\t 52\t 53\t 54\t 5a\t 5b\t ...and I need to create a bundle of associated xml (php?) files that look something like:HEADER ...<string> 11</string><string> 21</string><string> 31</string> ...</row><row><number> 12 </number><number> 22 </number> ...</row><row></null> #where there are as many nulls as the are columns</row>FOOTERThis is in fact part of a swf based program that generates graphs and can be found at www.maani.us (I have no link with this site). I basically want to be able to change the csv file once a week and have the graph automatically generate from the most up to date csv file whenever someone views the webpage. My questions are threefold:1. Is php a suitable way of doing this?2. If so can I just replace data in the xml file (which I guess will now have to be a php file) with php scripts to fetch the relevant data from the csv file?3. If so then how, do I need to open and read the csv file initially? if not then any other suggestions?Many thanks in advance Link to comment https://forums.phpfreaks.com/topic/35647-warning-newbie-creating-dynamic-graphs/ Share on other sites More sharing options...
Cep Posted January 25, 2007 Share Posted January 25, 2007 1. It is possible for PHP to convert a csv to xml and then output the results2. PHP could build your new xml file from the data it retrieves from the CSV (though its probably easier to do this with Excel 2003 if you dont mind the MS schema)3. If your new this is quite an ambitious program you want to script but as always the best place to learn is from the PHP manual. Link to comment https://forums.phpfreaks.com/topic/35647-warning-newbie-creating-dynamic-graphs/#findComment-168838 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.