php de resim ile göstermek için şu şekilde yapabilirsin.$deger pr fonksiyonundan aldiğin prdir ve buna göre if döngüleriyle resimleri cıkarabilirsin...

if ($deger==1){

echo "<table width=200 border=0 bordercolor=#CCCCCC cellspacing=0 cellpadding=0>"; 
  echo"<tr>
    
    <td  width=50 class=yazi><img src=pr1.gif width=20 height=20 />$pr</td>
	 
  </tr>";
echo "</table>";
}