Hi,
Simple question here.
I'm trying to check whether an image location (pulled from a text file) exists, and if so display it. Not too difficult, but I have the problem that if the image doesn't exist, it displays a broken image.
if (!empty($data[$r][2])) {
echo "<span style=\"display: block;width:100%;\"><a href=\"loader.php?cid={$data[$r][0]}\"><img src=\
"/images/{$data[$r][2]}\"></a></span>\n";
} else {
echo "";
}
I need it to do nothing if there is no image link in the file.
Any thoughts?