This is my csv file:
I only need the Subject, Start Date, End Date, Location, and Description columns.
In short I'd like to make it look like this in php
I'm pretty sure I need a mutli dimensional array but I can't for the life of me get it to work.
I've only got this so far.
Code:
"Subject","Start Date","Start Time","End Date","End Time","All day event","Reminder on/off","Reminder Date","Reminder Time","Meeting Organizer","Required Attendees","Optional Attendees","Meeting Resources","Billing Information","Categories","Description","Location","Mileage","Priority","Private","Sensitivity","Show time as"
"Basic Class","7/12/2010","12:00:00 AM","7/17/2010","12:00:00 AM","True","False","7/11/2010","6:00:00 AM",,,,,,,"
","01-10",,"Normal","False","Normal","3"
"Adv Class","7/12/2010","12:00:00 AM","7/31/2010","12:00:00 AM","True","False","7/11/2010","6:00:00 AM",,,,,,,"
","01-10",,"Normal","False","Normal","3"
"Basic Class","7/26/2010","12:00:00 AM","7/31/2010","12:00:00 AM","True","True","7/25/2010","6:00:00 AM",,,,,,,"This is a description for 02-10
","02-10",,"Normal","False","Normal","3"
"Basic Class","8/2/2010","12:00:00 AM","8/7/2010","12:00:00 AM","True","True","8/1/2010","6:00:00 AM",,,,,,,"
","03-10",,"Normal","False","Normal","3"
"Adv Class","8/2/2010","12:00:00 AM","8/28/2010","12:00:00 AM","True","True","8/1/2010","6:00:00 AM",,,,,,,"
","02-10",,"Normal","False","Normal","3"
"Med Class","8/16/2010","12:00:00 AM","8/21/2010","12:00:00 AM","True","True","8/15/2010","6:00:00 AM",,,,,,,"
","02-10",,"Normal","False","Normal","3"
"Med Class","7/19/2010","12:00:00 AM","7/24/2010","12:00:00 AM","True","True","7/18/2010","6:00:00 AM",,,,,,,"
","01-10",,"Normal","False","Normal","3"
"Basic Class","8/30/2010","12:00:00 AM","9/4/2010","12:00:00 AM","True","True","8/29/2010","6:00:00 AM",,,,,,,"
","04-10",,"Normal","False","Normal","3"
I only need the Subject, Start Date, End Date, Location, and Description columns.
In short I'd like to make it look like this in php
I'm pretty sure I need a mutli dimensional array but I can't for the life of me get it to work.
I've only got this so far.
PHP:
<?php
print("<TABLE>\n");
$row = 0;
$handle = fopen("classcal.csv", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
for ($c=0; $c <= $row; $c++)
{
echo("<TR>");
echo("<TD>".$data[0]." </td>");
echo("<TD>".$data[16]." </td>");
echo("<TD>".$data[1]." </td>");
echo("<TD>".$data[3]." </td>");
echo("<TD>".$data[15]." </td>");
echo("</TR>");
}
}
fclose($handle);
?>