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

I have this error in view,

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

//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>";

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

Thanks in advanced.

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.