If I understand you correctly, just assign the picture's path to a string, then do an if else statement like this:
$picture1 = "path/to/picture1.jpg";
$picture2 = "path/to/picture2.jpg";
if(ifstatement) {
echo "<img src='$picture1'>";
} else {
echo "<img src='$picture2'>";
}
Hope that clarifies,
Charlotte Genevier
Webligo Group
http://www.webligo.com