php - printing keys with embedded function

FrarcePag

New Member
I need help figuring out these php print (echo) statements and where to place them. I have an embedded function 'strotime' that is transforming time (column 'StartTime') to a format, but I cannot get it to print out correctly. No errors, just no changes or use of the function.Can someone help me figure out where to place this properly in this foreach loop? (as you can see, i placed at beginning and tried an if statment too..but no luck). Thanks foryour help.\[code\]$keys = array('Server', 'Target','Logdate','Set','StartTime', 'Length','Size','Status');echo '<table><tr>';foreach ($keys as $column) echo '<th>' . $column . '</th>'; echo '</tr>';foreach ($data as $row){ echo '<tr>'; foreach ($keys as $column) //if ($column == 'StartTime') { // echo '<td>' . date("Y-m-d H:i:s",strtotime($row[$column])) . '</td>'; if (isset($row[$column])){ echo '<td>' . $row[$column] . '</td>'; } elseif ($column =='StartTime') { echo '<td>' . date("Y-m-d H:i:s",strtotime($row[$column])) . '</td>'; } elseif ($column == 'Status') { echo '<td> Check for Errors </td>'; } else { echo '<td> </td>'; } //}}echo '</table>';\[/code\]
 
Back
Top