PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<td><div align="center"><span class="cifrarate">
<?=GetValue($recSRC,"CredRate"); //[I get the value of this from the database, the result is a letter, but I want to be a graphic image of that letter]
$CredRate = GetValue($recSRC,"CredRate");
//$color = ("CredRate"); //Define the variable $color
if ($CredRate = A) //If the color is red...
{//do this
echo "<img src=\"images/a.jpg\">";
} else if ($CredRate = B) {//however if the color is green, do this
echo "<img src=\"images/b.jpg\">";
} else if ($CredRate = C) {//And if the color is blue, do this
echo "<img src=\"c.jpg\">";
} else if ($CredRate = D) {//And if the color is blue, do this
echo "<img src=\"images/d.jpg\">";
} else if ($CredRate = F) {//And if the color is blue, do this
echo "<img src=\"images/f.jpg\">";
} else {//And finally, if color matches none of the conditions, display this
echo " TOO NEW (No rating)";
}//end the statements
?>
</span></strong></div></td>
Last edited by Benjamin on Fri Apr 24, 2009 8:44 pm, edited 1 time in total.
Reason:Changed code type from text to php
You should also be quoting your strings. You probably arn't seeing the notices becauase your error level is set too low. I would always recommend developing with atleast