[eluser]piker[/eluser]
Solution
I made in VIEW something like this:
Code:
<?php foreach ($adam as $key): ?>
<h3><?=$key->title?></h3>
<p><?=substr($key->body, 0, 100)?>...</p>
etc...
You ask me for an error information.
If in controller is something like this:
Code:
line1 $query = $this->db->query("SELECT title, SUBSTR( body, 1, 50 ) FROM newsy");
line2
line3 foreach ($query->result_array() as $row)
line4 {
line5 echo $row['title'];
line6 echo $row['body'];
line7 }
CI give us that error information:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined index: body
Filename: controllers/newsy.php
Line Number: 6
I'am using XAMPP under WinXP in standard configuration.