Skip to content

Instantly share code, notes, and snippets.

@glynrob
Created January 24, 2012 20:47
Show Gist options
  • Save glynrob/1672479 to your computer and use it in GitHub Desktop.
Save glynrob/1672479 to your computer and use it in GitHub Desktop.
<?php
if ($allRecords->num_rows() > 0)
{?>
<table cellpadding="4">
<tr>
<td>Name</td>
<td>Email</td>
<td>Phone</td>
</tr>
<?php
$total = 0;
foreach ($allRecords->result() as $record)
{?>
<tr>
<td><?php echo ($record->name);?></td>
<td><?php echo ($record->email);?></td>
<td><?php echo ($record->phone);?></td>
</tr>
<?php }?>
</table>
<?php }?>
<p>ID 1 in the example table using <strong>$this->Example->getById(1);</strong></p>
<p><?php echo ($idOne->name);?> <?php echo ($idOne->email);?> <?php echo ($idOne->phone);?></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment