Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function DisplayContent(){
- echo '<table width="550" style="margin:0 auto;">';
- echo '<thead><h1 class="pagehead">Upcoming Events</h1><br /></thead>';
- echo '<tbody>';
- echo '<tr>';
- echo '<td width="166" style="text-align:center;">Date</td>';
- echo '<td width="166" style="text-align:center;">Event</td>';
- echo '<td width="166" style="text-align:center;">Location</td>';
- echo '</tr>';
- $row = 1;
- if (($handle = fopen("events.csv", "r")) !== FALSE) {
- while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
- $num = count($data);
- $row++;
- echo '<tr>';
- for ($c=0; $c < $num; $c++) {
- echo "<td>" . $data[$c] . "</td>n";
- }
- echo '</tr>';
- }
- fclose($handle);
- }
- echo '</tbody>';
- echo '</table>';
- }
Add Comment
Please, Sign In to add comment