Guest User

Untitled

a guest
May 26th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <!-- Here is a basic HTML table -->
  2. <table>
  3. <tr>
  4. <th>ID</th>
  5. <th>Name</th>
  6. <th>Power Rating</th>
  7. <th>Created on</th>
  8. </tr>
  9. <!-- A foreach loop creates an array that we can then use to loop through -->
  10. <?php foreach ($records as $record) : ?>
  11. <tr>
  12. <!-- Replace id, name and price with your own column headings from your table -->
  13. <td><?php echo $record['id']; ?></td>
  14. <td><?php echo $record['name']; ?></td>
  15. <td><?php echo $record['price']; ?>%</td>
  16. <!-- Here is the PHP date function in action, you can change d F Y to suit your project -->
  17. <td><?php echo date('d F Y', strtotime($record['date-created'])); ?></td>
  18. </tr>
  19. <?php endforeach; ?>
  20. </table>
Add Comment
Please, Sign In to add comment