CSV data needs to be converted to key 2 dimensional array
------------ file = csvdata.csv --------
symbol,date1,date2,date3,date4
QCOM,10,11,12,13
CTSH,20,21,22,23
AAPL,41,42,43,44
------------ end of csv file ----
$inputsymbol = QCOM ; // $inputsymbol will come from html FORM.
Note:
- Multiple symbols in same file. 1 line per symbol (or match)
- number of headers are not fixed. will increase with time and so is data.
data that match $inputsymbol only should be included in $data1 array which needs to be as below.
$data1 = array (
array(date1,10),
array(date2,11),
array(date3,12),
array(date4,13)
);