I'm trying to change the image within a html src="" attribute with PHP and can't seem to do it so the image will change on the fly.
What am I doing wrong here?
My code is below
$image = "Trousers:";
if($image == "Trousers:"){
$imageChange = "images/socks.PNG";
}
echo '<div id="itemImg"><img src="<?php echo $imageChange ?>" width="100px" height="100px" /></div>';