So I have a csv file that looks like
Total Short-Term Gain/(Loss): -1111.11, Total Commissions/Fees: 1111.11
Symbol,Qty,Opening Date,Opening Price,Opening Net Amount,Order,Closing Date,Closing Price,Closing Net Amount, Gain (Loss),Term
BPAX, 1000, 02/06/2012, 0.8088, 808.80, S, 02/06/2012, 0.8456, 845.58, 36.78, Short
CBIS, 2500, 02/28/2012, 0.1726, 431.50, S, 02/29/2012, 0.2064, 515.99, 84.49, Short
CBIS, 2000, 04/02/2012, 0.154, 317.99, S, 04/04/2012, 0.169, 328.00, 10.01, Short
DEJ, 5900, 05/02/2012, 0.3299, 1951.28, S, 05/02/2012, 0.3405, 2008.90, 57.62, Short
I able to display it using
<?php
echo "<html><body><table>\n\n";
$f = fopen("test.csv", "r");
while (($line = fgetcsv($f)) !== false) {
echo "<tr>";
foreach ($line as $cell) {
echo "<td>" . htmlspecialchars($cell) . "</td>";
}
echo "<tr>\n";
}
fclose($f);
echo "\n</table></body></html>
I would like to sort it by the Closing Date column, not moving the first row of totals.
Then I would Like to graph it. With X axis being the Closing Date(Column 7) and Y being the Gain/Loss(Column 10)