<tr> <th>#</th> <th>order ID</th> <th>agent</th> <th>actions</th> </tr> </thead> <tbody>'; $count = 1; foreach ($deliveries as $deliveryID) { $delivery = new Delivery($deliveryID); $agent = new Agent($delivery->getAgent()); $pageBody .= ' <tr> <td>' . $count . '</td> <td>' . $delivery->getOrder() . '</td> <td>' . $agent->getName() . '</td> <td> <ul> <li> <a href="?section=deliveries&action=view&target=' . $deliveryID . '">view</a> </li> <li> <a href="?section=deliveries&action=edit&target=' . $deliveryID . '">edit</a> </li> </ul> </td> </tr>'; $count++; } $pageBody = '