movieprodw
asked on
replacing non existing images with images
Hello,
I am using google base to pull content and some of the content has image links that are broken, this is resulting in me having 100 images and 5 broken images on a page.
Is there any way to say .if image not found then display /no_image.jpg.?
I am using google base to pull content and some of the content has image links that are broken, this is resulting in me having 100 images and 5 broken images on a page.
Is there any way to say .if image not found then display /no_image.jpg.?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here it is.
<div class="image">
<a href="listing.php?gid=<?=$aProperty[$j]["sId"]?>">
<img src="<?php if (file_exists($aProperty[$j]["sImg"])) { echo $aProperty[$j]["sImg"]; } else { echo "images/nopicture.jpg"; } ?>" title="Real Estate, <?php echo $aProperty[$j]["sLocation"]; ?>" width="96" height="66" border="0" />
</a>
</div>
ASKER
interestingly enough that replaced all of the images with my no image!
I think its because they are getting pulled from google and they are not being pulled from the server like a normal file?
I think its because they are getting pulled from google and they are not being pulled from the server like a normal file?
ASKER
Is there a php way to do it?
here it the code,
<div class="image"><a href="listing.php?gid=<?=$