Hey guys I am pulling images to my front end using this PHP:
echo '<img class="ms-thumb" src="'.(explode(',', $cardata["PictureRefs"])[0]).'" alt="'.$cardata["Variant"].'" />';
So I'm taking images from my database and displaying them in a list, in rare cases some SQL rows wont have an image url.
Can anyone show me an example of code that I could use to display a placeholder image if the src="" is empty?
I'm not great with JS and I'm guessing I'll need to use it to accomplish this.
Any example of how this could be done would be great.