• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
foreach simple problem.

#1
[eluser]solid9[/eluser]
I have this error in view,

error message
Code:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: views/prod_show.php
Line Number: 78

prod_show.php
Code:
<?php
//foreach($query as $row){
foreach($rows as $r):
   echo "<tr>";
   echo "<td>". $r->prod_name ."<br></td>";
   echo "<td>". anchor('prod_c/prod_edit/'.$r->prod_name, 'Edit') ."</td>";
   echo "<td>". anchor('prod_c/prod_delete/'.$r->prod_name, 'Delete') ."</td>";        
   echo "</tr>";
endforeach;        
?&gt;

I don't see aproblem with the foreach, can you see any problem with it?

Thanks in advanced.

#2
[eluser]Unknown[/eluser]
Hi, I have the same problem, help us if there are any solutions... I have tried it for a few days...thanks for helping us before


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.