Welcome Guest, Not a member yet? Register   Sign In
error
#2

[eluser]boltsabre[/eluser]
You've got a shorthand foreach loop in there that you forgot to close and you've got your "no records" inside your if statement, you want something like this ;-)

Code:
<?php if(isset($records)) : foreach($records as $row) : ?>

<h2>&lt;?php echo $row->title; ?&gt;</h2>
<div>&lt;?php echo $row->content; ?&gt;</div>

<h2>No records were returned.</h2>

&lt;?php endif; ?&gt;

Should be:
&lt;?php if(isset($records)) :?&gt;
   &lt;?phpforeach($records as $row) : ?&gt;

    <h2>&lt;?php echo $row->title; ?&gt;</h2>
    <div>&lt;?php echo $row->content; ?&gt;</div>
   &lt;?php endforeach; ?&gt;
&lt;?php else:?&gt;
    <h2>No records were returned.</h2>
&lt;?php endif; ?&gt;


Messages In This Thread
error - by El Forum - 02-21-2013, 07:12 AM
error - by El Forum - 02-21-2013, 07:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB