Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

An uncaught Exception was encountered

$
0
0
in CodeIgniter view i have this, 
<!DOCTYPE html>
<html>
<head><title></title>

</head>
<body>

<?php 
echo "<table>
<tr>
    <th>Date</th>
  <th>Name</th>
  <th>Age</th>
  <th>Address</th>
  <th>Contact No</th>
  <th>Description</th>
</tr>"
if (isset($records)) {
foreach ($records as $row ){
echo "<tr>";
echo "<td>". $row->Date. "</td>"; 
echo "<td>" . $row->Name. "</td>";
echo "<td>" . $row->Age. "</td>";
echo "<td>" . $row->Address. "</td>";
echo "<td>" . $row->ContactNo. "</td>";
echo "<td>" . $row->Description. "</td>";
echo "</tr>";
}
}
echo "</tbody>
</table>";
<?php endforeach ;?>
<?php else :?>
<?php endif;?>
</body>
</html>

I got error near if and foreach 

how to resolve this?

Viewing all articles
Browse latest Browse all 14348

Trending Articles