Hi, I tried to figure this out but i'm shooting in the dark :)
What I want to do is compare two values, either value1 against value2 or if value2 is empty then value1 against value3. add to that, that I want to echo different images depending on the result.
<?php
if (isset($second)){
if($first - $second) <= 5){
echo "<img src=\"images/img1.png\" />";
}elseif($first - $second > 5){
echo "<img src=\"images/img2.png\" />";
}else{
echo "<img src=\"images/img3.png\" />";
}
}
else{
if($first - $third) <= 5){
echo "<img src=\"images/img1.png\" />";
}elseif($first - $third > 5){
echo "<img src=\"images/img2.png\" />";
}else{
echo "<img src=\"images/img3.png\" />";
}
}
?>
I don't know if I'm close or not in the ballpark, but hopefully someone else can help me make sense of this!
Take care
Adam