Ask a Question

 

Start Coding Today

   

GeeksQuiz

GeeksforGeeksIDE

Data Structures

Algorithms

Interview Experiences

C Programming

C++ Programming

Java Programming

GATE CS

Books

error as undefined variable image and trying to get property of non object

<h2><i>Top Rated</i></h2>
<center>
<table>
 <tr>
  <? foreach($top_ratings as $key => $image) : ?>
  <td valign="top"><img src="images/<?=$image->filename?>" width="70" /></td>			
  <? endforeach ?>
 </tr>
 <? 
 <tr>
  <? foreach($top_ratings as $key => $image) : ?>
  <td valign="top">Score: <?=$image->score?></td>
  <? endforeach ?>
 </tr>
 <tr>
  <? foreach($top_ratings as $key => $image) : ?>
  <td valign="top">Performance: <?=$image->performance?></td>
  <? endforeach ?>
 </tr>
 <tr>
  <? foreach($top_ratings as $key => $image) : ?>
  <td valign="top">Won: <?=$image->wins?></td>
  <? endforeach ?>
 </tr>
 <tr>
  <? foreach($top_ratings as $key => $image) : ?>
  <td valign="top">Lost: <?=$image->losses?></td>
  <? endforeach ?>
 </tr> 
    ?>
</table>
</center>

 

asked Jan 13, 2016 by iamgautam

Please log in or register to answer this question.

...