I now have
display_errors = 1
error_reporting = E_ALL & ~E_DEPRECATED
log_errors = On
I am getting a monster error message:
Warning: fopen(Enid Jan-2012.csv): failed to open stream: Permission denied in /Library/WebServer/Documents/DispatchReports/callstodispatch/MonthlyReport.php on line 181
So, I took a sledgehammer and changed the permissions, and the file was created.
The big question is how am I supposed to get my data into an array so that 'fputcsv();' will write to the file? Here's what I'm dealing with:
echo '<table style = "margin:auto; border:2px solid blue; border-collapse:collapse">';
echo '<tr style="background-color:#73B0FF">';
echo '<th> Tech<br>Number:</th>';
echo '<th style="width:150px"> Name:</th>';
echo '<th />';
for ($counter=0; $counter<$NumMonth; $counter++)
{
echo '<th>' . $W["$counter"] . '<br>' . $D["$counter"] . '</th>';
}
echo '<th>Calls</th>';
echo '<th>Work<br />Orders</th>';
echo "</tr>";
Where do I go from here? Each element of the array would be between the <th> fields, and the line would terminate on the </tr>. But how would I get to an array from here?
ty
tim