Welcome Guest, Not a member yet? Register   Sign In
How to select all or get all the data in a table?
#4

[eluser]towki[/eluser]
[quote author="mr_prasanna" date="1342365113"]Replace
Code:
<?php foreach ($results as $row) ?>
<h2>&lt;?php echo $row['id'] ?&gt;</h2>
<h3>&lt;?php echo $row['Name'] ?&gt;</h3>

with this

Code:
&lt;?php foreach ($results as $row) ?&gt;
<h2>&lt;?php echo $row['id'] ?&gt;</h2>
<h3>&lt;?php echo $row['Name'] ?&gt;</h3>
&lt;?php endforeach; ?&gt;

Basically, endforeach is missing.[/quote]

Thanks mr_passana for your reply. But I didnt get it to work when i tried your code.
It show me this error
Quote:Parse error: syntax error, unexpected T_ENDFOREACH in C:\xampp\htdocs\basicwebsite\application\views\view_data.php on line 6


Messages In This Thread
How to select all or get all the data in a table? - by El Forum - 07-15-2012, 07:56 AM
How to select all or get all the data in a table? - by El Forum - 07-15-2012, 08:11 AM
How to select all or get all the data in a table? - by El Forum - 07-15-2012, 08:16 AM
How to select all or get all the data in a table? - by El Forum - 07-15-2012, 08:39 AM
How to select all or get all the data in a table? - by El Forum - 07-15-2012, 08:43 AM
How to select all or get all the data in a table? - by El Forum - 07-15-2012, 09:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB