function displayEntries($entries, $admin = 0) { $i = 0; $html = '<table border="0" align="center">'; $html .= '<tr>'; foreach ($entries as $entry) { $i++; $html .= '<td>'; $html .= renderEntry($entry); $html .= '</td>'; if ($i % 4 == 0) { $html .= '</tr><tr>'; } } $html .= '</tr></table>'; return $html; }
<ul> <li>id = <?php print $e->getID(); ?> </li> <li>author = <?php print $e->getAuthor(); ?> </li> <li>body = <?php print $e->getBody(); ?> </li> </ul> <?php } } ?> <h2>Creating</h2> <?php $e = Entry::create(1, $input); ?> <blockquote> <?php renderEntry($e); ?> </blockquote> </body> </html>